Scripts:Wait seconds

Jump to: navigation, search

The wait command sets a wait in ticks (of which there are 18.3 in a second). It is normally best to set waits in ticks rather than in seconds, as the number of ticks per second may vary (e.g. if the game is paused or the computer is running slowly). But if you do want to set a wait in seconds you can use this script (e.g. wait seconds(2)):

script, wait seconds, seconds, begin
  variable (wait until)
  wait until := milliseconds + seconds * 1000
  while (milliseconds < wait until) do (wait)