Whats the best way to wait for a few seconds ?

Blitz3D Forums/Blitz3D Beginners Area/Whats the best way to wait for a few seconds ?

Insane:
Your question was answered. I was merely trying to be funny. I thought it was rather clever anyhow. :-)


The best way to have somehting like a reload time is to use a system like my event system which I released for free a while back. I beleive it's in the code archives. Then you can use one set of code for all kinds of events and not just waiting for a reload to finish.


But for a quick solution do this:


Const RELOAD_TIME = 2000


In main loop:

If Reload = True
If Current_Time > Reload_End_Time
Reload = False
Reload_Gun()
EndIf
EndIf


And when the player needs to reload go:


Reload = True
Reload_End_Time = Current_Time + RELOAD_TIME