I had a script that did a llSleep(10). I found that if someone paid the object during this time, the object accepted the payment, but the money event never fired.
Actually, it wasn't quite as simple as that... The Sleep() call was in one state (with a money block), and soon after the sleep, the script changed states back to default. So it was actually something like this:
CODE
state default
{
touch()
{
next_state;
}
}
state next_state
{
state_entry()
{
say("I'm in next_state");
sleep(10)
say("I just woke up!");
default;
}
money(id, amount)
{
say("I got paid!")
}
}
If I pay the object during the sleep in "next_state", when should I expect the money event to fire?
a) during the sleep?
b) IMMEDIATELY after the sleep?
c) at the end of state_entry?
If the answer is c, and the last line in state_entry of next_state actually switches state, could it be that the money event is never called?
Thanks for any assistance you can provide.
Adman