Difference between revisions of "Command:Wait"

From Lavish Software Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Syntax ==
 
== Syntax ==
 
{{CMD-DR|Wait|Intermediate|Intermediate|Beginner|Intermediate}}
 
{{CMD-DR|Wait|Intermediate|Intermediate|Beginner|Intermediate}}
 +
Wait <tenths of seconds> [early continue condition]
  
 
== Description ==
 
== Description ==
 +
Pauses execution of this script for a specified amount of time, given in tenths of seconds (deciseconds).  A condition may be supplied in order to continue execution early.  The condition and end time will be checked once per frame.
  
 
== Examples ==
 
== Examples ==
 +
*Wait 10
 +
: Waits 1 second
 +
*Wait 10 ${StopWaiting}
 +
: Waits 1 second or until ${StopWaiting} is non-zero
 +
 +
== Note ==
 +
Parameter must be an int, not a decimal.  Values less than 1 result in no wait.
 +
 +
noop x 100 took 0.047000 seconds
 +
wait 0 x 100 took 0.078000 seconds
 +
wait 0.5 x 100 took 0.062000 seconds
 +
wait 0.1 x 100 took 0.063000 seconds
 +
wait 1 x 100 took 11.138000 seconds
 +
waitframe x 100 took 1.669000 seconds
  
 
== See Also ==
 
== See Also ==
 
*[[LavishScript:Commands|Commands]]
 
*[[LavishScript:Commands|Commands]]
 
{{Command-Stub}}
 
{{Command-Stub}}
 +
[[Category:LavishScript]]
 +
[[Category:LavishScript Commands]]

Latest revision as of 18:04, 21 February 2010

Syntax

Command Difficulty Rating
Wait
Usage Intermediate
Level of Understanding Intermediate
Computer Savvy Beginner
Logic Intermediate

Wait <tenths of seconds> [early continue condition]

Description

Pauses execution of this script for a specified amount of time, given in tenths of seconds (deciseconds). A condition may be supplied in order to continue execution early. The condition and end time will be checked once per frame.

Examples

  • Wait 10
Waits 1 second
  • Wait 10 ${StopWaiting}
Waits 1 second or until ${StopWaiting} is non-zero

Note

Parameter must be an int, not a decimal. Values less than 1 result in no wait.

noop x 100 took 0.047000 seconds
wait 0 x 100 took 0.078000 seconds
wait 0.5 x 100 took 0.062000 seconds
wait 0.1 x 100 took 0.063000 seconds
wait 1 x 100 took 11.138000 seconds
waitframe x 100 took 1.669000 seconds

See Also