Page 1 of 1


Posted: Sat Jun 16, 2012 10:57 pm
by WhoElseButMe
This should work across the board all games all platforms.
This isn't too much of a tutorial its more to explain the parameters of the wait function and how the times are calculated.

To call on $wait$ will allow the game to wait a specific amount of time. The parameter you tag on to the end will determine how to wait the specified number parameter. Generally you call $wait$ with a number value either integer %i(0,number without a decimal) or float %f(number with a decimal)
You can also use a %GLOBAL% provided the global is of the proper type.
Wait also supports another parameter, this other parameter indicates the units of measure which tells the game how to calculate the passed in number value and how long to wait. By default the units of measure are in milliseconds. So if you simply say $wait$%i(1000,000003e8), you'll wait 1 second.
Other units of measure are
$seconds$ - waits the value in seconds
$frames$ - waits the value in 16th's of a second. Current frame rate doesn't effect this.
$gameframes$ - waits the value in logic calls. Current frame rate effects this.

Also note that the above units of measure DO NOT need to be plural. $wait$%i(1,00000001)$second$ is the same as $wait$%i(1,00000001)$seconds$

You can write the wait call a few different ways.
All on one line like above, which is the easiest method.

Code: Select all

:i $Wait$%i(3,00000003)$gameframes$

Using call arguments which is ultimatally the same as placing them all on one line just with more typing.

Code: Select all

:i call $Wait$ arguments

Or as a structure

Code: Select all

:i $wait$:s{