Jump to content

Help needed, timer and touch_start


Aime Takaaki
 Share

You are about to reply to a thread that has been inactive for 4040 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi everybody!!

I have this script i'm working on and i would love a little help. My scripting level is basic. I'm having the problem that i can't get the touch_start event to trigger. My guess it's because of that timer in the state_entry event, but i'm clueless on how to solve it. I tried to call the timer on attach event, but that didnt do the trick. Help please????

 

 

key owner;
string sound ="woot";
fly()
{llOwnerSay("fly");}
default { state_entry() { owner = llGetOwner(); //llOwnerSay("state default"); llSetTimerEvent(0.2); } touch_start(integer total_number) { llSay(0, "Touched."); llPlaySound(sound, 1.0); } attach(key id) { if (id) { llOwnerSay("I have been attached!"); } else { llOwnerSay("I have been detached!"); } } timer() { integer flying = llGetAgentInfo(owner) & AGENT_FLYING; if (flying ){ state flying; //llOwnerSay("im flying"); } else{ state stop; } } changed(integer change){ if(change & CHANGED_OWNER){ llResetScript(); } } state_exit(){ llSetTimerEvent(0); } } state flying { state_entry() { llSetTimerEvent(0.2); } timer() { integer flying = llGetAgentInfo(owner) & AGENT_FLYING; if (flying) { fly();} else {state default;} } }

 BTW, this is not the complete script, just a small part of it, but it doesnt do much than this. 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4040 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...