This is what is meant to happen. The gun shoots then waits 250 milliseconds then shoots again.
The problem is it works fine for the first few seconds but then it speeds up the process.
Does anyone know what is wrong or knows how to fix this??
The problem lies in the event
> GunSubtract 1 * tickcount from 'Reload'[/code:1vtgmywb] If it was [code:1vtgmywb]> GunSubtract TimeDelta from 'Reload'[/code:1vtgmywb] And if the "loading" action was [code:1vtgmywb]> GunSet 'Reload' to 0.250[/code:1vtgmywb] It worked. Of course you can multiply TimeDelta by 1000 and use the current 250 value. See, the TimeDelta there means that it subtrackts "1" from the 'Reload' per one second. So, if the reload value is 0.250 it becomes less than zero in 250 milliseconds.
Develop games in your browser. Powerful, performant & highly capable.
wow thanks I can't belive it was that simple.
I spent hours trying to figure this out.
By the way what is the tickcount for im not 100% sure even though i used it.
This is why I am a firm believer in commenting everything in your program.
I may be wrong but I think he means in general what is it for, not why he used it.
Not that I don't support commenting
See System expressions for TickCount, and Ticks.
Since the tick count is always increasing, you definitely dont want to use it there!