Lots of cool new stuff in this build.
WHICH.. IS (select case)
[how to use] first add IS statements by doing the followingisXYZ:do something
IS accepts boolean 0-1, true/false, numbers 0-9, y/n or can also accept custom naming.
e.g.
is0:room is dark
is1:room is light
or..
isneg:narrate -1
isneutral:narrate 0
ispos: narrate 1
To run a WHICH check:which %cranelever%
FOR LOOPS
FOR loops allow you to loop a task X amount of times.
e.g.
To set a FOR LOOP:
for:do testscript
To run a FOR LOOP:
for 0-10
Example Script Content To Run:
testscript:
narrate %x%;
~x+1
Where x in my example are array entries containing simple map data 0/1s
ARRAYS
Array like data can be defined using variables. For example:
#map[0]=0
#map[1]=1
#map[2]=0
#map[0][0]=1
#map[1][0]=0
#map[2][0]=1
#map[0][0][1]=0
#map[1][0][4]=1
#map[2][0][7]=1
See complex specials below.
'COMPLEX%SPECIALS%'
Complex specials first swap out any data surrounded by %% and then surrounded by ' '
For example:
~pX=%player.x%;
~pY=%player.y%;
~pZ=%player.z%;
#'map[%pX%][%pY%][%pZ%]'=BUNKER ENTRANCE
Currently it works using temp vars as above not direct calls to player.var or target.var.
DELAY x
You can now specify a delay before the next script action processes. The delay runs until the delay value reaches 0, subtracting 1 each tick. The value can hold any number but bear in mind too high a number will result in too long a delay!
short delay:delay 100
long delay:delay 1000
NEW TIMER COMMANDS
START TIMER - resumes an active timer.stop timer 0
STOP TIMER - pauses an active timer.stop timer 10
ERASE TIMER - deletes an active timer.erase timer 5
Timers will need to be micromanaged. The best way would be to create a variable pointer to timers you want to have control over. Timers are incremented from 0 and their data is stored in session_map_data. Type edit session to view.
#healtimer=1;
start timer %healtimer%
BUGS FIXED
TIMED EVENTS are now working again!after x second do somethingevery x minutes do something
DELETE MULTIPLE CHARACTERS
Delete no longer deletes multiple characters occasionally when pressing backspace.
DELETE KEY:
no longer deletes entire code entry while text is being rendered, was most notable when adlengine was loading if you made mistakes trying to enter commands and had to delete characters.