Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer channelNo = -730441;
- integer listenHandle = 0;
- // Change this for appropriate mode
- integer HUD = 0; // my watch :)
- //integer HUD = 1;
- remove_listen_handle() {
- if (listenHandle)
- llListenRemove(listenHandle);
- }
- default {
- attach(key id) {
- if(id) {
- if (HUD) {
- // Listener
- listenHandle = llListen(channelNo, "", llGetOwner(), "");
- } else {
- // Sender-
- llRegionSayTo(llGetOwner(),channelNo,"Attached");
- }
- } else {
- if (HUD) {
- // Listener-
- remove_listen_handle();
- } else {
- // Sender-
- llRegionSayTo(llGetOwner(),channelNo,"Detached");
- }
- }
- }
- listen(integer chan, string name, key id, string msg) {
- // debug
- llOwnerSay("msg: [" + msg + "]");
- if (msg == "Attached") llOwnerSay("watch attached");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement