Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer chn = -133742069; //make sure it matches chn in the emiter
- string div = "|"; //divider. make sure it matches, too.
- rotation rot;
- vector pos;
- list parse;
- string nAlias; //node alias (received through the inbound message)
- string mAlias; //my alias; set the object's description to the same as the emiter
- integer cAlias; //compare aliases
- default{
- state_entry(){
- llListen(chn,"","","");
- llSetTimerEvent(4.0);
- mAlias = llGetObjectDesc();
- }
- listen(integer ch,string n,key id,string ms){
- mAlias = llGetObjectDesc();
- parse = llParseString2List(ms,[div],[]);
- nAlias = llList2String(parse,2);
- if (ch == chn && nAlias == mAlias){
- cAlias = TRUE;
- rot = (rotation)llList2String(parse,0);
- pos = (vector)llList2String(parse,1);
- llSetRegionPos(pos);
- llSetLocalRot(rot);
- }
- else cAlias = FALSE;
- llOwnerSay("Debug: "+"\nrotation: "+(string)rot+"\nposition: "+(string)pos+"\nnode alias: "+nAlias+"\nmy alias: "+mAlias+"\nalias check: "+(string)cAlias+"\nfull message: "+ms);
- }
- timer(){
- mAlias = llGetObjectDesc();
- }
- changed(integer chng){
- if(chng & CHANGED_OWNER){
- llResetScript();}}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement