Tash Navarathna
-
Posts
7 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Posts posted by Tash Navarathna
-
-
I did it with states.
integer info;key owner; default{ state_entry() { llSetTimerEvent(.5); owner = llGetOwner(); } timer() { info = llGetAgentInfo(owner); if(info & AGENT_MOUSELOOK) state mouselook; else state notmouselook; } }state mouselook{ state_entry() { llSetTimerEvent(0.5); } timer() { info = llGetAgentInfo(owner); if(info & AGENT_MOUSELOOK); else state notmouselook; } }state notmouselook{ state_entry() { llSetTimerEvent(0.5); llTriggerSound("foxblast2", 1);} timer() { info = llGetAgentInfo(owner); if(info & AGENT_MOUSELOOK) state default; }}
Also Freya, you might be more helpful if you didn't assume who you were helping was completely braindead when it comes to scripting.
-
Doing it that way causes it to spam the returns every .5 seconds,
I'm trying to have it do a return only once, so it doesn't play a holster noise every .5 seconds after you exit mouselook.
This is the most I could come up with, but it doesn't work.
integer info;default{ state_entry() { llSetTimerEvent(1); } changed(integer info) { if(info & !AGENT_MOUSELOOK) { llSay(0, "Touched."); } } timer() { info = llGetAgentInfo(llGetOwner()); }}
-
I did use llSetTimerEvent. I set it to 1 second.
-
I did check the wiki, the only example there is for telling you if you're in mouselook by touching it, which is not what I want. I also tried info = llGetAgentInfo(llGetOwner()); in timer, but no matter where I place the if (info & AGENT_MOUSELOOK), like changed, state_entry, it returns once and never again.
-
I can't seem to figure out how to keep the script checking the agent info to return if they're in mouselook or not. For example, when exitting mouselook I'd like a gun to play a sound like it was set to safety or something.
-
Clicking on Merchant Home in my marketplace takes me to an agreement with accept at the bottom, but when accept it click the page reloads and nothing happens.
Having a script do something when exitting mouselook
in LSL Scripting
Posted
Well thanks anyway, I appreciate it. But don't I need the timers in the states to be able to return them to the other states?