Ok i've dig into the latest release and here is the function i know how to use:
This is a new command that easily make loop from one number to another.
FOR VariableName FROM Min TO Max DO TriggerName
or
FOR VariableName FROM Min TO Max DO {
Action1
Action2
...
}
Sieben implement a new condition system with ELSE condition. This mean when you check for a condition with the IF, you can specify a trigger to be executed when the condition is false Syntax:
ON TriggerName IF (Condition) <RUN_IF_TRUE> ELSE <RUN_IF_FALSE>
For a quick example, lets say i want to set a variable to 1 if the var is greater than 100 and 0 if it is less than 100.
IF (MyVar >= 100) <SET MyNewVar 1> ELSE <SET MyNewVar 0>
So if MyVar is greater than 100, i set MyNewVar to 1, else i set it to 0. Pretty easy.
This is to be used by the network connection to BS2, will be extremly usefull for my editor.<br> Syntax:
LIST INTERACTIONS '''''ElementName'''''
Here is what returned if i use 'Water' as the ElementName:
INTERACTION Water Fire Steam Clear 10000 INTERACTION Water Glue Water Glue 25000
Syntax:
DRAW ELEMENT:Earth ELLIPSE '''''X Y HorizontalDiameter VerticalDiameter''''' DRAW ELEMENT:Earth FILLEDELLIPSE '''''X Y HorizontalDiameter VerticalDiameter'''''
Syntax:
DRAW ELEMENT:Earth REPLACEFILLEDELLIPSE '''''X Y HorizontalDiameter VerticalDiameter ElementToReplace'''''
Dont know how to use this yet.
Syntax:
TIMER REMOVE '''''TriggerName''''' TIMER REMOVEALL '''''TriggerName'''''
This will remove any timer related to the given Trigger.
Example:
// ELEMENTID REPLACEELEMENTID X Y WIDTH HEIGHT REMOVETRIGGER REPLACEFILLEDRECT ON REPLACEFILLEDRECT SET tmp 0 ON REPLACEFILLEDRECT WHILE (tmp < $5) REPLACEFILLEDRECT2 REMOVETRIGGER REPLACEFILLEDRECT2 ON REPLACEFILLEDRECT2 DRAW $0 REPLACELINE $2 ($3 + tmp) $4 0 $1 ON REPLACEFILLEDRECT2 SET tmp (tmp + 1) REMOVETRIGGER timerTest1 ON timerTest1 EXEC REPLACEFILLEDRECT ELEMENT:Clear ELEMENT:Earth 10 25 200 25 ON timerTest1 WRITE ELEMENT:Earth 20 50 25 TEXT "Timer1=" ON timerTest1 WRITE ELEMENT:Earth (20 + WRITEWIDTH) 50 25 NUMBER Timer1Count ON timerTest1 SET Timer1Count (Timer1Count + 1) ON timerTest1 TIMER 60 FRAMES timerTest1 REMOVETRIGGER timerTest2 ON timerTest2 EXEC REPLACEFILLEDRECT ELEMENT:Clear ELEMENT:Earth 10 75 200 25 ON timerTest2 WRITE ELEMENT:Earth 20 100 25 TEXT "Timer2=" ON timerTest2 WRITE ELEMENT:Earth (20 + WRITEWIDTH) 100 25 NUMBER Timer2Count ON timerTest2 SET Timer2Count (Timer2Count + 1) ON timerTest2 TIMER 120 FRAMES timerTest2 REMOVETRIGGER KEY_1 ON KEY_1 TIMER REMOVE timerTest1 REMOVETRIGGER KEY_2 ON KEY_2 TIMER REMOVE timerTest2 REMOVETRIGGER KEY_s ON KEY_s TIMER REMOVEALL timerTest1 ON KEY_s TIMER REMOVEALL timerTest2 ON KEY_s EXEC timerTest1 ON KEY_s EXEC timerTest2 EXEC clearscreen EXEC KEY_s
* Press 1 to stop the first timer * Press 2 to stop the second timer * Press s to start all timers
Normally this would not have been possible because of the TIMER CLEAR that clear every timer present in memory.
Now you can choose wich one to clear, or clear them all like before.