Difference between revisions of "Command:TimedCommand"

From Lavish Software Wiki
Jump to navigation Jump to search
Line 9: Line 9:
  
 
== Examples ==
 
== Examples ==
*<tt>TimedCommand 10 "echo One second has passed"</tt>
+
*TimedCommand 10 "echo One second has passed"
 +
*This example WILL work because the variable has global scope.
 +
declare GlobalVariable int global 0
 +
TimedCommand 20 GlobalVariable:Set[1]
 +
*This example WILL work because the variable does not have global scope.
 +
declare ScriptVariable int Script 0 <br>
 +
TimedCommand 20 ScriptVariable:Set[1]
  
 
== See Also ==
 
== See Also ==

Revision as of 19:24, 8 September 2005

Syntax

Command Difficulty Rating
TimedCommand
Usage Beginner
Level of Understanding Beginner
Computer Savvy Newbie
Logic Beginner

TimedCommand <delay in tenths of seconds> <command>

Description

Executes a command after a specified amount of time, given in tenths of seconds. This does not pause execution.

Please note that TimedCommands operate on a Global scope. In practical terms, this means that TimeCommands cannot operate on Local or Script scope variables.

Examples

  • TimedCommand 10 "echo One second has passed"
  • This example WILL work because the variable has global scope.

declare GlobalVariable int global 0 TimedCommand 20 GlobalVariable:Set[1]

  • This example WILL work because the variable does not have global scope.

declare ScriptVariable int Script 0
TimedCommand 20 ScriptVariable:Set[1]

See Also