Jump to content

Tirips

Resident
  • Posts

    2
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, thanks for replying. I did try the llSetTimerEvent(0.0); inside the if-statement for "off" but it doesn't seem to do anything. The lights still go dark -- but only for 2.5 seconds. It is as if the timer always picks the biggest number it saw? I don't understand. Wait... I think it's working ... why didn't it before??? That's why i made the comment post to begin with LOL.
  2. Hi, this is my first post to the forum, I hope I don't do it wrong. I have a prim that listens for me to say things in hidden chat channel, and depending on what it hears, it changes prim color for 2.5 seconds, then the prim color resets. My avatar is a robot and I use colored lights for very simple non-verbal communication. I wrote the script a long time ago and it works fine. But I'm trying to add a new function. I added an on-off switch my avatar where clicking it triggers a body animation, and the button says "off" into hidden chat. I want the lights to continue changing colors for 2.5 seconds as they always have, UNLESS it hears "off" in which case it turns lights dark indefinitely, until the switch on my neck is clicked again and says "reset" to turn the lights on again. This is the part I'm having trouble with: hearing "off" works and turns the prim color dark grey -- but only for 2.5 seconds. How can I have the "off" function escape the color-reset 2.5 seconds later? To say it more clearly, I want hearing "off" to turn prim dark grey, indefinitely, until it hears "reset" again from other prim being touched again. Here is my marked-up script: float delay=2.5; default { state_entry() { llListen(89,"", NULL_KEY, ""); } listen(integer channel, string name, key id, string message) { if (message == "no") //hearing "no" turns prim red for 2.5 seconds { llSetColor(<1,0,0>,ALL_SIDES); llSetTimerEvent(delay); } if (message == "yes") //hearing "yes" turns prim green for 2.5 seconds { llSetColor(<0,1,0>,ALL_SIDES); llSetTimerEvent(delay); } if (message == "uhm") //hearing "uhm" turns prim yellow for 2.5 seconds { llSetColor(<1,1,0>,ALL_SIDES); llSetTimerEvent(delay); } if (message == "reset") //hearing "reset" resets color to pink { llSetColor(<1.0,0.424,0.710>,ALL_SIDES); } if (message == "off") // hearing "off" turns prim dark grey -- ideally indefinitely until prim hears "reset" { llSetColor(<0.2,0.2,0.2>,ALL_SIDES); } } timer() { llSetColor(<1.0,0.424,0.710>,ALL_SIDES); //resets color to pink } } I tried to add an llSetTimer to the if-statement for "Off" (llSetTimerEvent(0.0);) but the prim color resets to pink anyway. Thank you for the help, I'm a weak scripter.
×
×
  • Create New...