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!
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]); } }}
Share this post
Link to post
Share on other sites