Trying to be clever, I wanted to have the default state handle moving an object. At certain times, the movement parameters would change and the state would change to itself in order to 'refresh' the motion.
As a test, to explore programming like this, here was my code:
CODE
default
{
state_entry() {
llSay(0,"hi");
}
state_exit() {
llSay(0,"bye");
}
touch(integer n) {
state default;
}
}
This was the output when I clicked on it a bunch:
hi
bye
bye
bye
bye
I expected alternating hi's and bye's