[Opensim-users] llVolumeDetect

Dahlia Trimble dahliatrimble at gmail.com
Fri Oct 17 20:23:19 UTC 2014


Assuming you're correct about it losing the property after a restart, I'd
think this test would work in either SL or OpenSimulator:

changed(integer what)
{
        if (what & (CHANGED_REGION_START | CHANGED_REGION_RESTART))
         {
                 llVolumeDetect(FALSE);    // toggle bug fix in Opensim
                 llVolumeDetect(TRUE);
         }
}

On Fri, Oct 17, 2014 at 10:07 AM, Fred Beckhusen <fred.b at mitsi.com> wrote:

> I use llVolumeDetect()  to detect avatar collisions to trigger game
> effects and teleports when an avatar falls into water or fire, or walks
> into a rabbit hole.
>
> The widely used hypergrid "Blamgate" teleporter I based my work on would
> sometimes not work after a reset.   The llVolumeDetect prim property did
> not get preserved after a restart.
>
> I eventually figured out that a changed()  event with the Opensim-specific
> CHANGED_REGION_RESTART ( not CHANGED_REGION_START) flag is needed to turn
> llVolumeDetect(FALSE) and llVolumeDetect (TRUE) again. This will turn the
> collision off and on again. I have found this, and only this, works
> reliably.
>
> // Works in
>
> default
> {
>     state_entry()     {
>         llVolumeDetect(TRUE);
>     }
>     collision_start(integer total_number)    {
>         llSay(0, "Bumped: "+(string)total_number);
>     }
>     changed(integer what)    {
>         if (what & (CHANGED_REGION_RESTART)    // not
> CHANGED_REGION_START, that is for Second Life, REstart is for Opensim
>         {
>             llVolumeDetect(FALSE);    // toggle bug fix in Opensim
>             llVolumeDetect(TRUE);
>         }
>     }
> }
>
> --ooo------/\/\/\-----|(------ooo------/\/\/\-----|(------ooo----
> Ferd Frederix/Fred K. Beckhusen
> http://www.outworldz.com
>
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at opensimulator.org
> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20141017/3e051fa5/attachment.html>


More information about the Opensim-users mailing list