Basic SMMU Functions
Break - breaks out of the current loop.
script 0
{
for(x=0, x<10, x++)
{
if(x==5) break();
}
}
Continue - continues to next loop.
Not sure of how this one is used.
Return - exits a script.
script 0
{
if(switch_is_activated)
{
if(floor_is_raised) return();
}
}
Goto - the infamous goto statement. Goes to a label in the file.
:john
script 0
{
if(jake) goto(john);
}
Include - uses a header file.
include("things.h");
script 0
...
Print - prints a message to the console.
script 0
{
print("I know what you did last summer");
}
Rnd - produces a random number, 1-100.
script 0
{
x = rnd();
}
Beep - makes a beeping sound.
script 0
{
tip("Beep beep!");
beep();
}
Clock - get the current time in a script.
Not sure how to use this one.
Wait - waits a given number of clocks. 100 clocks in one second.
script 0
{
tip("Hi!");
wait(300);
tip("Yo!");
}
Startscript - Starts a new instance of a script.
script 3
{
tip("Heya!");
}
startscript(3);