Understanding Second Life State Machines
Submitted by jeffheaton on Thu, 01/10/2008 - 05:46
To see state machines in action, consider the default script, which is automatically generated by Second Life, when a new script is created. This script is shown here.
default
{
state_entry()
{
llSay(0, "Hello, Avatar!");
}
touch_start(integer total_number)
{
llSay(0, "Touched.");
}
}This script starts with the word default. The word default specifies the name of the state that the enclosed code belongs to. For this script there is only one state. This state, which is named default, is the starting state for any script in Second Life.












