We noticed a strange beahviour of volumedetect which i don't understand.
What we used was this simple script on a box:
default
{
state_entry()
{
llVolumeDetect(TRUE);
}
touch_start(integer total_number)
{
llSay(0, "Touched."
;}
collision_start(integer collide)
{
llSay(0, llDetectedName(0) + " stepped on me."
; }
collision_end(integer collide)
{
llSay(0, llDetectedName(0) + " left me."
;}
}
What now happens is the following: When ever an avatar is on the box (which is more a plate actually), the collision_start is rised as it should and when the avatar left the box, the collision_end appears. But now, when the avatar who collides with the box touches the box while staying on it and don't move at all, the script rises a collision_end and then a collision_start again. Some time the collision_start comes first when touching and then the collision_end also. The events are rised on entering/leaving the box AND when touching it.
We even noticed, what makes the whole thing even more strange, that when one rez' another box with a touch_start event in the near of the box with the llVolumeDetect (both prims don't collide and aint linked together they're just some cm away from each other), and the new box is touched while staying on the llVolumeDetect box, the collision_end and the collision_start is rised also.
That makes it difficult for us as we wanted to have the volumedetect interact with a door which is triggered by touching. The volumedetect does some functions and sets some flags while it detects a collision_start. The flags are dropped on collision_end. When we touch the door now, while staying on the "detection pad", it rises the events and messes the whole flagsetting up.
That happens not, when an avatar touches which doesn't collide with the pad, only the touching of the avatar staying on the pad will rise the events.
Is there anyone who has an idea why this happens and how it is possible to prevent this behaviour?
Thankyou for any hints or tips