Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

newbie question - collisions

PleaseWakeMeUp Idler
Registered User
Join date: 10 Oct 2006
Posts: 48
01-20-2008 19:54
Why doesn't this say "bump" when I place it in a phantom object and stand inside it?

default
{
state_entry() {
llVolumeDetect(TRUE);
}

collision(integer detect) {
llOwnerSay("bump.";);
}
}

Thanks!

Wake
_____________________
Please visit http://www.SecondSeeker.com for reviews of "non-sleaze" SL sites.
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
01-20-2008 20:03
As I understand it you can't make the object phantom in the usual way, or llVolumeDetect doesn't work. llVolumeDetect makes the object phantom for you anyway, but it's a special kind of phantomness with added VolumeDetect magic. So just put the script in a normal solid object and it should do its thing.

edit: oh yeah, and what Alicia said too, perhaps :o
_____________________
Designer of sensual, tasteful couple's animations - for residents who take their leisure time seriously. ;)

http://slurl.com/secondlife/Brownlee/203/110/109/

Alicia Sautereau
if (!social) hide;
Join date: 20 Feb 2007
Posts: 3,125
01-20-2008 20:03
default
{
state_entry()
{
llVolumeDetect(TRUE);
}

collision_start(integer num_detected)
{
llOwnerSay("bump.";);
}
}


need to use collision_start() :)
_____________________
PleaseWakeMeUp Idler
Registered User
Join date: 10 Oct 2006
Posts: 48
01-20-2008 20:29
Alicia is right!

Bummer. I actually want it to say "bump" as long as I'm collided, but I guess that that is what timer's are for...

Thank both of you for the speedy response!

Wake
_____________________
Please visit http://www.SecondSeeker.com for reviews of "non-sleaze" SL sites.
PleaseWakeMeUp Idler
Registered User
Join date: 10 Oct 2006
Posts: 48
01-20-2008 20:35
this works just fine.... Thanks all!

default
{
state_entry() {
llVolumeDetect(TRUE);
}

collision_start(integer detect) {
llOwnerSay("bump.";);
llSetTimerEvent(1.0);
}
collision_end(integer detect) {
llOwnerSay("done bump.";);
llSetTimerEvent(0.0);
}

timer() {
llOwnerSay("another bump.";);
}
}
_____________________
Please visit http://www.SecondSeeker.com for reviews of "non-sleaze" SL sites.