Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parserutils.php on line 205

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parserutils.php on line 208

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parserutils.php on line 389

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parserutils.php on line 530

Deprecated: Function split() is deprecated in /var/www/siebn.de/wiki/inc/auth.php on line 154
bs2_codinghelp_bs2alpha4 [Burning Sand Wiki]
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /var/www/siebn.de/wiki/inc/template.php on line 242
 

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parser/parser.php on line 66

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parser/lexer.php on line 292

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parser/handler.php on line 22

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parser/handler.php on line 49

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parser/handler.php on line 213

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parser/handler.php on line 241

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parser/handler.php on line 295

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parser/handler.php on line 328

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parser/handler.php on line 575

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/siebn.de/wiki/inc/parser/xhtml.php on line 939

Ok i've dig into the latest release and here is the function i know how to use:

Changes & Additions

  • added FOR
  • added GETFILE
  • added INTERACTIONTRIGGERAT
  • added INTERACTIONAT
  • added INTERACTIONREMOVE
  • fixed LIST INTERACTIONS
  • added TIMER REMOVE X
  • added TIMER REMOVEALL X
  • added FILLEDELLIPSE
  • added ELLIPSE
  • added REPLACEFILLEDELLIPSE
  • added RANDOMFILLEDELLIPSE
  • rewrote explosions
  • enhanced RESTART
  • fixed several small bugs
  • fixed memory leak
  • speed improvements
  • added ELSE
  • added PHYSICS
  • added drawing lines (hold CTRL)
  • added drawing lines (hold ALT)
  • speed is improved. timers are now several times faster.

FOR LOOP

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
    ...
  }

IF THEN ELSE

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.

LIST INTERACTIONS

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

ELLIPSE & FILLEDELLIPSE

Syntax:

DRAW ELEMENT:Earth ELLIPSE '''''X Y HorizontalDiameter VerticalDiameter'''''
DRAW ELEMENT:Earth FILLEDELLIPSE '''''X Y HorizontalDiameter VerticalDiameter'''''

REPLACEFILLEDELLIPSE

Syntax:

DRAW ELEMENT:Earth REPLACEFILLEDELLIPSE '''''X Y HorizontalDiameter VerticalDiameter ElementToReplace'''''

RANDOMFILLEDELLIPSE

Dont know how to use this yet.

TIMER REMOVE, REMOVEALL

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.

Misc Changes

  • PHYSICS: 0 means all physics are deactivated (very fast). 1 means physics are enabled.
 

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /var/www/siebn.de/wiki/inc/template.php on line 785
bs2_codinghelp_bs2alpha4.txt · Last modified: 2008/08/08 14:19 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki