Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

collision_start, Collision_end question

SpikE Odets
Registered User
Join date: 11 May 2005
Posts: 5
07-22-2005 17:39
I have a flat peice that I would like to know when someone walks over it, i tried using the collision_start and collision_end to see when they are on it.. and have gotten off of it so it will send 2 messages.. one while they are on it.. one while they are off.

For some reason while your standing on the object it sends both events and spams the room until you get off of it. Any suggestions?


default {
collision_start(integer num_detected) {
llSay(0, llDetectedName(0) + " is on me";);
}
collision_end(integer num_detected) {
llSay(0, llDetectedName(0) + " walked off of me";);
}
}

I am very new to Collision events.. and the sl programming language, but read the wiki to mean that each one of these evens would fire one time, when the collision started.. and ended.. not 1,000,000 times until the colision ended.
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
07-22-2005 17:44
In theory, yes, that should work. However, physics can be somewhat iffy in SL. Your best option would be to use llVolumeDetect.
_____________________
Need scripting help? Visit the LSL Wiki!
Omega Point - Catherine Omega's Blog
Rayve Mendicant
Scripts for L$5 billion
Join date: 12 Mar 2005
Posts: 90
07-22-2005 18:04
use a list to manage this.

when collision_start happens search the list to see if that person is already on the object. if not add this persons key to the list (key_list += llDectedKey(i);) my experience with volumedetect produced the same problem.
_____________________
_______________________

Rayve Mendicant
Second Evolution

"Darwin ain't got nothin' on this"
Champie Jack
Registered User
Join date: 6 Dec 2003
Posts: 1,156
07-22-2005 18:22
From: Rayve Mendicant
use a list to manage this.

when collision_start happens search the list to see if that person is already on the object. if not add this persons key to the list (key_list += llDectedKey(i);) my experience with volumedetect produced the same problem.



I've been having the same problem with collision_start. I was hoping that I wouldn't have to use lists and comparisons to get the behavior I wanted. But, it looks like this is the only way.

Thanks
_____________________