Difference between revisions of "0001"

From GTAMods Wiki
Jump to navigation Jump to search
(updating page)
Line 1: Line 1:
{{OpCode
+
{{Icon|trilogy}}
| ini        = 0001=1,%1d%
+
<hr />
| description = Stops the execution of a [[thread]]
+
'''Description'''
| p1          = Time to wait (in milliseconds)
+
: Stops the execution of a [[thread]]
| game        = [[GTA 3]], [[Vice City]], [[San Andreas]], [[Liberty City Stories]], [[Vice City Stories]]
+
'''Syntax'''
| native      = [[WAIT]]
+
: 0001: wait [''int''] ms
}}
+
: wait [''int'']
This opcode stops an execution of the thread for specified amount of time in ms. In both the [[Mission Builder]] and [[Sanny Builder]], you can type '''wait''' instead. A parameter value of 0 (wait 0 ms) means that the thread will regain focus as soon as possible, whereas values greater than 0 denote the minimum time span that has to go by before the thread is revisited. A wait is required for almost all [[Create a thread#Loops|loops]].
+
'''Parameter'''
 +
: [''int'']
 +
:: Time to wait in milliseconds
 +
'''Native analog'''
 +
: [[WAIT]]
  
==Keywords==
+
This opcode stops an execution of the thread for specified amount of time in ms. A parameter value of 0 (wait 0 ms) means that the thread will regain focus as soon as possible, whereas values greater than 0 denote the minimum time span that has to go by before the thread is revisited. A wait is required for almost all [[Create a thread#Loops|loops]].
 +
 
 +
== Example ==
 +
The following example, using Sanny Builder, shows a simple loop, with the required "wait" opcode.
 +
<source lang="scm">
 +
while true
 +
    wait 0 ms
 +
end
 +
</source>
 +
 
 +
== Keywords ==
 
wait, thread
 
wait, thread
 +
 +
[[Category:OpCodes]]

Revision as of 17:26, 22 November 2011

GTA III Vice City San Andreas


Description

Stops the execution of a thread

Syntax

0001: wait [int] ms
wait [int]

Parameter

[int]
Time to wait in milliseconds

Native analog

WAIT

This opcode stops an execution of the thread for specified amount of time in ms. A parameter value of 0 (wait 0 ms) means that the thread will regain focus as soon as possible, whereas values greater than 0 denote the minimum time span that has to go by before the thread is revisited. A wait is required for almost all loops.

Example

The following example, using Sanny Builder, shows a simple loop, with the required "wait" opcode.

while true
    wait 0 ms
end

Keywords

wait, thread