Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

walking through walls

Enkil Prototype
Junior Member
Join date: 7 Jul 2004
Posts: 7
07-14-2004 09:25
Is there a wy to turn off collision for a specific avatar with a scripted opject?

i'm still a n00b..

(so if conditions are met(boolean TRUE) the avatar can walk through the object, but not other objects, and no other avatar can walk through at the same time)

The problem I'm trying to solve is that my object currently goes phantom, but this applies to everyone. I'd like the door to be phantom for just one avatar at a time.

I can positively identify the avatar, and I was thinking that there must be some function to test immediate or imminent collision.

the logic would be simple:
(pseudocode)
if ((avatarCollidesWithObject ) && (AvatarNameInList))
{
//nocollide for this avatar
}

thanks in advance!
Cubey Terra
Aircraft Builder
Join date: 6 Sep 2003
Posts: 1,725
07-14-2004 09:32
You can't script an avatar to pass through a solid object. However, you *can* script the solid object to become phantom if a certain avatar collides with it, then return to solid a short while after. I don't know if this suits your needs, however.
_____________________
C U B E Y · T E R R A
planes · helicopters · blimps · balloons · skydiving · submarines
Available at Abbotts Aerodrome and XstreetSL.com

Hank Ramos
Lifetime Scripter
Join date: 15 Nov 2003
Posts: 2,328
07-14-2004 09:41
Use an outer, totally transparent "detector field" prim (oversize it so that agents collide with it before they get to the door). If only valid people walk into this prim (make sure to use llVolumeDetect(TRUE) so that the item is phantom AND can detect collisions) then make your "door" phantom. If anyone that isn't authorized is in the detector field, then dont make the door phantom.

There is an example of this in the University of Second Life library, made by Ben Linden, called the Volume Detect Door. I have also made a modified version for use in the University of Second Life dormitory sliding doors.
_____________________
Enkil Prototype
Junior Member
Join date: 7 Jul 2004
Posts: 7
07-14-2004 11:56
Thats a good idea, hank :)

how do i get the detector field to communicate with the door?
Adam Zaius
Deus
Join date: 9 Jan 2004
Posts: 1,483
07-14-2004 12:19
Listen/Say would be the easiest way of doing it, however, it's recently come to many scripters attention that the listen event causes a lot of lag on the sim; which has led to the development of a few alternatives:

1) llMessageLinked - Very lightweight on simfps, and very easily implemented.
2) Timer / llKey2Name / llSetName - Pretty lightweight (not as good), and can be used at distances much larger than messagelinked.

There's other methods, (lots of them.) but those are some of the best.

-Adam
_____________________
Co-Founder / Lead Developer
GigasSecondServer
Rysidian Rubio
Ruby Red Head
Join date: 14 Jan 2004
Posts: 263
07-15-2004 17:05
Thought/Question..

I know that if you have a phantom prim and a non-phantom prim, and you link them with the non-phantom prim as the parent, then the linked object will be non-phantom, and vica-versa.

But what if you have a 2 non phantom prims in a linked object, and you turn on llVolumeDetect for a child prim. Does this mean that the volumedetect will now work for the whole object? or just the child prim that contains the script and the rest will remain solid?
I'd try this to see, but I'm at work atm.