The changetimer command functions the same as the changevar command, but takes framerate into account. It is used for anything that involves speed or time primarily.
"then(changetimer, variable, method of change, value)"
Argument |
Function |
variable |
The stored variable that is being changed. (Must be initalized previously!) |
method of change |
The method in which the variable is being changed. (+, -, =, *, /) |
value |
The change that is occuring. |
And example of the changetimer command used in a script is as follows...
The following script moves the tile's x position at 1 unit per frame, to create a looping animated block.
if(always)
{
then(changetimer,tile,+,1)
then(changetile,tile,0)
}
if(compare,tile,=,128)
{
then(changevar,tile,=,0)
}
|
|