[GLOBAL]Wait

Tutorial forum for Tony Hawk games.
Forum rules
No requests, use other sections for that. TAG your titles [THAW][THUG2] etc.
WhoElseButMe
Posts: 416
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

[GLOBAL]Wait

Postby WhoElseButMe » Sat Jun 16, 2012 10:57 pm

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
    %i(3,00000003)$frames$

Or as a structure

Code: Select all

:i $wait$:s{
    %i(1,00000001)
    $second$
:s}
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.

Return to “Tutorials”

Who is online

Users browsing this forum: Google [Bot] and 2 guests