Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //string name;
- integer channel = -131313;
- integer listen_handle;
- integer color;
- default
- {
- state_entry()
- {
- // initialize the listener
- // the listener will listen to everybody who touches the door-button (NULL_KEY)
- listen_handle = llListen(channel, "", NULL_KEY, "");
- color - TRUE;
- }
- listen(integer listen_channel, string name, key id, string message)
- {
- // only do something if the channel, where the message is received
- // is equal to our listen channel and if the message is «operate»
- if(listen_channel == channel && message == "operate")
- {
- // close or open the door (your original script)
- //rotation rot = llGetLocalRot();
- if (color = TRUE)
- {
- //rot.z = 0.707107;
- //rot.s = -0.707107;
- llSetLinkColor(LINK_SET, <0.000, 0.523, 0.000>, ALL_SIDES);
- llSay(0, "This item has been located");
- llSetText("Found by "+ message , <0.9,0.6,1>, 0.75);
- llSay(0,"hi");
- (color = FALSE);
- }
- else if (color = FALSE)
- {
- //rot.z = 1;
- //rot.s = 0;
- llSetLinkColor(LINK_SET, <1.000, 0.255, 0.212>, ALL_SIDES);
- (color = TRUE);
- llSay(0,"Bye");
- }
- //llSetLocalRot(rot);
- }
- }
- }
Add Comment
Please, Sign In to add comment