timing of events with save game

BlitzMax Forums/BlitzMax Programming/timing of events with save game

slenkar(Posted 2009) [#1]
Hi I put the millisecs value in a field to keep track of when a spaceship last fired a bullet.
so a spaceship can only fire once every 2 seconds,

WHen I load and save the game, it gets all messed up because millisecs wraps around etc. etc.

So how would I keep track of when a ship last fired a bullet?


Kurator(Posted 2009) [#2]
save the current millisecs also - so you can recalculate the difference on loading :)


ImaginaryHuman(Posted 2009) [#3]
Check out the thread which I think BlitzSupport posted about how to overcome the shortcomings of MilliSecs() using Longs and some clever manipulation.


slenkar(Posted 2009) [#4]
thanks, got it sorted now,

I recalculated the difference