I'm trying to set up a situation whereupon entering an invisible prim volume, an avi triggers an event that keeps happening over and over while they're occupying that volume, but which ends as soon as they leave. I've set up a root prim (the invisible volume one) to use llVolumeDetect and collision_start to send a repeating link_message (on a timer) to a second linked prim, which actually does the repeating trigger event. The repeating event could be anything, like changing a texture or instantiating an object, etc...
My problem is that I can't seem to get out of the logic loop of repetition. I've been staring at this tiny bit of code for hours and trying everything I know (which admittedly isn't that much), but it won't work. Can someone tell me what I'm doing wrong?
Again, if this isn't the right place, I profusely apologize for any offense or disturbance.
Here are the scripts:
In the root prim:
---------------------------------
default
{
state_entry()
{
llVolumeDetect(TRUE); // turns llVolumeDetect on.
}
collision_end(integer num_detected) {
llMessageLinked(LINK_SET, 0, "deactivate", NULL_KEY);
}
collision_start(integer num_detected) {
llSetTimerEvent(1.0); // generate a timer event every 3 seconds;
}
timer()
{
integer phantom = llGetStatus(STATUS_PHANTOM);
if(phantom==FALSE)
{
llResetScript();
}else
{
if(phantom==TRUE)
{
llMessageLinked(LINK_SET, 0, "activate", NULL_KEY);
}
}
}
}
--------------------------------------
In the linked prim:
--------------------------------------
default
{
link_message(integer sender_num, integer num, string str, key id)
{
if(str=="activate"

{
llSay(0,"activated"
;llSetColor(<llFrand(1.0),llFrand(1.0),llFrand(1.0)>,ALL_SIDES); // set a random color
}else
{
if(str=="deactivated"

{
llSay(0,"deactivated"
;llSetColor(<1.0,1.0,1.0>,ALL_SIDES);
}
}
}
}
----------------------------
Again, the random color thing is just a dummy event, basically an event placeholder while I work up the logic structure. Same thing with the "activated" "deactivated" announcements.
Thanks for any help provided.
)