Why will this script not reset?
|
|
Rock Ryder
Registered User
Join date: 6 Oct 2006
Posts: 384
|
09-23-2007 03:12
Hi, The script I am working on generates a menu, and the user has three choices. Depending on the choice the execution jumps to the relevant state and executes the code there. The last statement is always: state finishUp; The finish up state is as follows: state finishUp { state_entry() { llSay(0, "I got into the finish up state OK."  ; //debug check. Did I get here ok? llResetScript(); } } I know I am getting to the finish up state ok, due to the debug message I inserted, but the script does not reset. Every time, in order to continue and use the Menu again, I must select the prim with the script in it in Edit Mode, and select Reset Scripts in Selection from the Tools Menu. So the question is, why doesn't the llResetScript(); line above not work? Any ideas? Rock
|
|
Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
|
09-23-2007 03:58
just a guess...
try putting the llResetScript() into a function instead of a state and then call this function, when you want to reset the script...
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
09-23-2007 06:41
From: Rock Ryder Every time, in order to continue and use the Menu again... If invoking the menu involves touching the prim, see  ; if that's the problem, it may help to put in a no-op touch_start() handler in the finishUp state (even though one might really prefer the state to not allow touches).
|
|
Rock Ryder
Registered User
Join date: 6 Oct 2006
Posts: 384
|
09-23-2007 07:20
From: Qie Niangao If invoking the menu involves touching the prim, see  ; if that's the problem, it may help to put in a no-op touch_start() handler in the finishUp state (even though one might really prefer the state to not allow touches). Hi Qie, Yes, that jira describes it perfectly, so it is a bug. The touch_start IS in a child prim of a linked set with another touch_start event in the root prim too. I am not sure what you mean by a no-op touch_start() handler. Do you mean something like this: state finishUp { touched_start { } state_entry() { llResetScript(); } }
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
09-23-2007 08:27
Yeah, like that I think will work. (... well, "touch_start()" not "touched_start"  ) That is, you're just trying to trick the state that calls llResetScript() into thinking it has some kind of touch event handler, so the viewer keeps touch sensitivity when the script is reset.
|
|
Rock Ryder
Registered User
Join date: 6 Oct 2006
Posts: 384
|
09-23-2007 10:04
OK, this works.
Many thanks Qie.
Rock
|
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
09-23-2007 10:05
Rock, be sure to log into jira and vote for that issue so LL knows it's important.
|
|
Rock Ryder
Registered User
Join date: 6 Oct 2006
Posts: 384
|
09-23-2007 18:18
From: Lex Neva Rock, be sure to log into jira and vote for that issue so LL knows it's important. Duly voted for.
|