When writing scripts for objects, there is a specific syntax that you need to follow to ensure that they work properly.
if
(
command
,
arguments...
)
and
if
(
command
,
arguments...
)
{
then
(
command
,
arguments...
)
else
then
(
command
,
arguments...
)
}
|
There are three main parts of a full script, the IF command, the THEN command and the ELSE command..
| Command Type |
Function |
| IF |
In order for the script to execute, the arguments in the IF block must succeed. |
| THEN |
If the IF command succeeds, the THEN block will also execute. |
| ELSE |
If the IF command fails, the ELSE block will execute. (This block is optional) |
Follow the above links to learn about each command that can be used in scripting.
Along with the basic command blocks, there is two other ways to interact with scripts.
| Command Type |
Symbol |
Function |
| Comment |
// |
Putting "//" as the first two symbols in a line turns it into a comment. This causes the compiler to ignore the line. |
| Debug Command |
\\ |
Putting "\\" as the first two symbols in a line turns it into a debug command. This is used in the authoring tools only. Debug lines are ignored unless the authoring tools are in debug mode. |
|