Jump to content

Tash Navarathna

Resident
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Tash Navarathna

  1. 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.

  2. 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());    }}

     

×
×
  • Create New...