Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

help with script

rossy Morenz
Registered User
Join date: 5 May 2006
Posts: 8
03-22-2008 10:32
After reading this forum, I put together this script in which an agent touches a wall and can go through it within 10 seconds.

I used llInstantMessage to avoid spamming the other avatars and llTriggerSoundLimited to try to restrict the sound to the wall area.

I was wondering if there is a way to make the wall becoming transparent ONLY for the agent who touches it and not for all the other avatars around.

Thanks a lot for your help




CODE

default
{
touch_start(integer total_number)
{

llSetStatus( STATUS_PHANTOM, TRUE);
llSetAlpha( .7, 1);

llSetTimerEvent( 10.0 );

llInstantMessage (llDetectedKey(0), "You have 10 seconds to walk through the wall or you'll be trapped.");

llTriggerSoundLimited("music", 1.0, llGetPos() + <199,154,98>, llGetPos() - <193,146,99>);
}
timer(){
llSetTimerEvent( .0 );
llSetStatus( STATUS_PHANTOM, FALSE);
llSetAlpha( 1.0, 1 );
state default;
}
}
Ollj Oh
Registered User
Join date: 28 Aug 2007
Posts: 522
03-22-2008 10:43
no.
that could be done via parcel access list, a lousy approach with negative side effects.

Another way yould be a double door, and the second door only opens if only one agent is between 2 closed doors, because the first door only closes with one agend between both doors.
rossy Morenz
Registered User
Join date: 5 May 2006
Posts: 8
03-22-2008 11:28
good idea, thanks!