Change font size
It is currently Fri Jan 18, 2019 6:18 am

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 1 of 1   [ 2 posts ]
Author Message
 Post subject: remote door script?
PostPosted: Fri Jun 29, 2018 9:54 am 

Joined: Mon Jan 09, 2017 5:07 pm
Posts: 9
Location: Austin, Texas
I just bought this darn script in SL for L$150 and darn thing is not working on the doors? something about bring in SL scripts I don't know about. I'm sure it's something every simple , but hey works in SL and not here.
=========================================
(Door Remote)

integer chan;
integer ready = TRUE;

default
{
on_rez(integer i)
{
llOwnerSay("Set object description to remote channel number.");
llResetScript();
}
state_entry()
{
llVolumeDetect(TRUE);
chan = (integer)llGetObjectDesc();
llListen((integer)llGetObjectDesc(),"",NULL_KEY,"");
}
listen(integer channel, string name, key id, string txt)
{
if(txt == "DOOR_READY")
{
llSetTimerEvent(0);
ready = TRUE;
}
}
timer()
{
llSetTimerEvent(0);
ready = TRUE;
}
collision_start(integer i)
{
if(chan != (integer)llGetObjectDesc())
llResetScript();
if((integer)llGetObjectDesc() == 0)
return;
if(!ready)
return;
llSay((integer)llGetObjectDesc(),"DOOR_OPEN|" + (string)llDetectedKey(0));
ready = FALSE;
llSetTimerEvent(30);
}
touch_start(integer i)
{
if(chan != (integer)llGetObjectDesc())
llResetScript();
if((integer)llGetObjectDesc() == 0)
return;
if(!ready)
return;
llSay((integer)llGetObjectDesc(),"DOOR_OPEN|" + (string)llDetectedKey(0));
ready = FALSE;
llSetTimerEvent(30);
}
}


Top
 Profile  
 
 Post subject: Re: remote door script?
PostPosted: Fri Jun 29, 2018 12:05 pm 

Joined: Mon Jul 19, 2010 3:30 am
Posts: 8
The script you have posted looks like its only half the story. When an avatar steps into/or clicks this prim the script is saying "DOOR_OPEN|key of avatar" on a chat channel defined in the prims objects description. I would think this is a sense prim and is probably meant to be rezzed near the door to be controlled. You would need a corresponding script in the door itself that would be listening for the "DOOR_OPEN|key of avatar" command.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 2 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net