|
Lotka Zagoskin
Registered User
Join date: 30 Sep 2006
Posts: 40
|
10-29-2006 20:17
i have a script using multiple states. the exit paths on these all have a transition back to default when the script exits. there is a touch_start in only default, but each of the other states have listeners and associated timers. i find that when i exit the script early, to cancel it, it leaves okay, but the "touch" on the pie if you right-click the ob is greyed out. i can, of course, edit it and reset the world on it, since i'm the owner. any hints as to why this might be happening? i do also prohibit grabs with a status change, but the single point exit function reenables them. in fact it does: finish() { llSetStatus( STATUS_BLOCK_GRAB, FALSE ) ; llResetScript() ; if ( TRUE ) { state default ; } }
|
|
Lotka Zagoskin
Registered User
Join date: 30 Sep 2006
Posts: 40
|
well, that's cute
10-29-2006 20:32
i put a touch_start( integer numberOfTouches ) {} event handler in each of the states other than default, whether or not they are intended to be touched. doing so returns the "touch" to an active state if the state exits using the finish() function sketched above. hmmm.
|
|
Llauren Mandelbrot
Twenty-Four Weeks Old.
Join date: 26 Apr 2006
Posts: 665
|
10-29-2006 21:12
Well, considering that your state-change code is documented as an unsupported hack, you should expect weird things to happen.
What puzzles me is that your question implies that the rest of the function is being executed despite and after a call to llResetScript(), which as I understand it should prevent subsequent code --i.e., the hack-- from executing. What happens when you delete the code to change state to default, and allow llResetScript() to change state to default for you, which is documented as a supported way to return to state default?
|
|
carol Wombat
Registered User
Join date: 29 Jan 2006
Posts: 16
|
10-29-2006 21:20
No sure what is going on here, but llSetStatus () changes the property of the prim and it would take another llSetStatus to change that property.
|
|
Lotka Zagoskin
Registered User
Join date: 30 Sep 2006
Posts: 40
|
actually, could probably remove the "state default"
10-29-2006 21:32
actually i could probably remove the "state default" now that i put in the touch_start handlers. it apparently isn't doing anything.
i expected a return to default with the reset. but, then, it didn't seem to be happening.
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
10-30-2006 01:07
If it doesn't return to default with a reset you're not resetting it correctly. By definition, default is where it starts after a reset after all.
|