Hello!I have such a wonderful script. It is turned on/off by chat command "ON/OFF".But I need the light to turn on and off on the same command, for example light.You say "light" for the first time and the light turns on. The second time and it turns off. Please help!
Question
MIVIMEX
Hello! I have such a wonderful script. It is turned on/off by chat command "ON/OFF". But I need the light to turn on and off on the same command, for example light. You say "light" for the first time and the light turns on. The second time and it turns off. Please help!
Thanks for your help in advance!
default { state_entry() { key owner = llGetOwner(); llListen(0, "", owner, ""); } listen(integer channel, string name, key id, string message) { if (message == "ON") { llSetPrimitiveParams([PRIM_POINT_LIGHT,TRUE,<1.0, 1.0, 1.0>,1.0,15,0.750, PRIM_GLOW, ALL_SIDES, 0.4]); } else if (message == "OFF") { llSetPrimitiveParams([PRIM_POINT_LIGHT,FALSE,<1.0, 1.0, 1.0>,1.0,15,0.750, PRIM_GLOW, ALL_SIDES, 0.0]); } }}
Link to comment
Share on other sites
15 answers to this question
Recommended Posts
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