Need syntax, preferably from the English language.
It seems as though what you want is two counters, one for the plasma firing and the other for seeing how long the weapon is out of commission.
So while firing, run something like this:[highlight=E2]interval(1000)
WepOn += 1[/highlight]Then when WepOn equals you target firing time (In seconds in this case, reduce the interval to make it faster), the weapon turns off and the second timer kicks in. The second is identical but the On code is made to disable firing when it isn't done.
To simplify:
- WepOn starts at 0; WepOff starts at (We'll say) 300, so the weapon can fire
- The weapon is fired, WepOn starts counting up
- When WepOn equals 240, the weapon stops firing, WepOff sets to 0, and the WepOff counter starts
- Because WepOff isn't 300, the weapon can't fire
- WepOff equals 300 again, WepOn is set to 0, the weapon can fire


LinkBack URL
About LinkBacks




Reply With Quote



Bookmarks