|
jaylin Lemon
Registered User
Join date: 15 Nov 2008
Posts: 2
|
04-07-2009 01:58
Hello, my problem is that I can't seem to get it to turn off when the object is rezzed if its on. I've tried a few methodes to do this and none of them are working for me. This is the way it currently is right now. I have llMessageLinked(LINK_ALL_OTHERS, 1111111, "", NULL_KEY); in the default state entry, I have a reset script happening with an onrez and it's still not turning off when its rezzed. It turns on and off fine with the touch. So I come to you very smart people in the hope that I can be shown the error of my ways. default { state_entry() { llPreloadSound("sound uuid"); llPreloadSound("sound uuid"); llMessageLinked(LINK_ALL_OTHERS, 1111111, "", NULL_KEY); llStopSound(); } on_rez(integer start_param) { llResetScript(); } touch_start(integer num) { if (llDetectedKey(0) == llGetOwner()) { state on; } } }
state on { state_entry() { llPlaySound("sound uuid",1); llSleep(3); llLoopSound("sound uuid",0.3); llMessageLinked(LINK_ALL_OTHERS, -1111111, "", NULL_KEY); }
touch_start(integer num) { if (llDetectedKey(0) == llGetOwner()) { state default; } } }
|
|
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
|
04-07-2009 02:54
Your on_rez event handler is only in state default ,so will only trigger if you are in this state, you need to put an on_rez handler in state on as well, then it should work.
|
|
jaylin Lemon
Registered User
Join date: 15 Nov 2008
Posts: 2
|
04-07-2009 03:02
OH MY! *blushes*
Thank you
|