Script syntax |
A scriptcommand always looks like this :
Commandname ( value1 ; value2 ; value3....) |
The number and type of values depends on the scriptcommand. PaC-DK checks your scripts for syntax errors. Scriptcommands that do not need any values still must end with both brackets ( ).
If statements :
if_
statements will decide if the following scriptline will be processed or not. You can process more than a single line of script after an
if_ statement by using curly brackets. Example
:
if_num ( number ; 10) |
All if_ statements can also be used like ifnot_ to invert the result. Some kinds of if statements like if_num allow to check for a range of numbers by using < and > . You may also use math operators when you handle numbers.
Events
:
Events are parts of scripts that react to a certain condition for example when the mousecursor moves over an object. Such an event could look like this :
on (mouse) |
Variables
:
Numbers and strings can be used in many scriptcommands as a value by using square brackets. Example :
setnum (mynumber ;
47) speech (ben ; I am a [mytext]. My number is [mynumber].) |