Difference between revisions of "Command:TimedCommand"
Jump to navigation
Jump to search
m |
|||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
== Syntax == | == Syntax == | ||
+ | {{CMD-DR|TimedCommand|Beginner|Beginner|Newbie|Beginner}} | ||
+ | <tt>TimedCommand <delay in tenths of seconds> <command></tt> | ||
== Description == | == 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 == | == 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 NOT work because the variable does not have global scope. | ||
+ | declare ScriptVariable int Script 0 | ||
+ | TimedCommand 20 ScriptVariable:Set[1] | ||
+ | Although the following will work fine: | ||
+ | TimedCommand 20 Script[MyScript].Variable[ScriptVariable]:Set[1] | ||
== See Also == | == See Also == | ||
*[[LavishScript:Commands|Commands]] | *[[LavishScript:Commands|Commands]] | ||
+ | |||
+ | [[Category:LavishScript]] | ||
+ | [[Category:LavishScript Commands]] |
Latest revision as of 22:49, 8 September 2005
Contents
Syntax
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 NOT work because the variable does not have global scope.
declare ScriptVariable int Script 0 TimedCommand 20 ScriptVariable:Set[1]
Although the following will work fine:
TimedCommand 20 Script[MyScript].Variable[ScriptVariable]:Set[1]