Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008056opensim[REGION] Script Functionspublic2016-11-12 11:362017-03-22 13:59
Reportermikelorrey 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformKitelyOSOpenSim 0.8.2.1 Release OS Version0.8.2.1
Product Version 
Target VersionFixed in Version 
Summary0008056: llVolumeDetect(TRUE); fails on region restart/bootup
DescriptionCreated a volume detect script for entryway "force fields" to flash when someone passes through the door. When the region shuts down and reboots, the volume detect function breaks/ceases function, requiring a touch reset by the owner, with the following script:

//Force Field Flashy Thingy v0.1 by Mike Lorrey
default
{
    state_entry()
    {
        llSay(0, "Entry Scanners Active...4...3....2...57...42...1...");
        llVolumeDetect(TRUE);
    }
    on_rez(integer start) {
        llResetScript();
        llSay(0, "Entry Scanners Active...4...3....2...57...42...1...");
        llVolumeDetect(TRUE);
    }
    
    collision_start(integer number){
       llSetLinkPrimitiveParamsFast(LINK_ROOT,[PRIM_GLOW,ALL_SIDES,0.5]);
       llSleep(0.5);
       llSetLinkPrimitiveParamsFast(LINK_ROOT,[PRIM_GLOW,ALL_SIDES,0.0]);
    }
    touch_start(integer number) {
      if (llDetectedKey(0)==llGetOwnerKey(llGetKey())) {
         llResetScript();
        }
    }
}

I had to make the klunky fix to make it work, which resets the script and turns volume detect to false then true again:

//Force Field Flashy Thingy v1.1 by Mike Lorrey
default
{
    state_entry()
    {
        llResetScript();
        llVolumeDetect(FALSE);
        llSleep(1.0);
        llSay(0, "Entry Scanners Active...4...3....2...57...42...1...");
        llVolumeDetect(TRUE);
    }
    on_rez(integer start) {
        llResetScript();
        llVolumeDetect(FALSE);
        llSleep(1.0);
        llSay(0, "Entry Scanners Active...4...3....2...57...42...1...");
        llVolumeDetect(TRUE);
    }
    changed(integer change)
    {
        if (change & CHANGED_REGION_RESTART) {
        llResetScript();
        llVolumeDetect(FALSE);
        llSleep(1.0);
        llSay(0, "Entry Scanners Active...4...3....2...57...42...1...");
        llVolumeDetect(TRUE);
        }
    }
    
    collision_start(integer number){
       llSetLinkPrimitiveParamsFast(LINK_ROOT,[PRIM_GLOW,ALL_SIDES,0.5]);
       llSleep(0.5);
       llSetLinkPrimitiveParamsFast(LINK_ROOT,[PRIM_GLOW,ALL_SIDES,0.0]);
    }
    touch_start(integer number) {
      if (llDetectedKey(0)==llGetOwnerKey(llGetKey())) {
         llResetScript();
        }
    }
}

Steps To Reproduce1) Apply the first example script above to a prim in a region using 0.8.2.1 with ODE
2) try it out
3) shut down your region
4) restart your region
5) prim remains phantom, but doesn't register any collisions. Flashing fails to occur.
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineODE
Script Engine
EnvironmentMono / Linux64
Mono VersionNone
Viewer
Attached Files

- Relationships

-  Notes
(0031274)
UbitUmarov (administrator)
2016-11-12 12:17

I can only say that your script seems to work correctly with 0.9/0.91 master.
I personally can not support older versions.
Also even with 0.9x problems specific to old ODE may not be fixed, since its only maintained for compatibility, and that does include some of its bugs.
(0031580)
Ferd Frederix (reporter)
2017-02-04 13:43
edited on: 2017-04-08 23:31

This is dependent upon Linux versus Windows, too. I had to add a llSetStatus(STATUS_PHANTOM,FALSE) on a Linux box, which was not necessary on Windows 0.8.2.1

This code below has always worked for me on various revs, Linux and Windows operating systems, 0.8.2.1, and 0.9 systems.

    state_entry()
    {
        llVolumeDetect(FALSE);
        llSetStatus(STATUS_PHANTOM,FALSE); // Linux specific
        llSleep(0.1); // necessary evil to wait a frame so the physics engine knows.
        llVolumeDetect(TRUE);
    }
    changed(integer change)
    {
        if (change & CHANGED_REGION_START) {
             llResetScript();
        }
    }


- Issue History
Date Modified Username Field Change
2016-11-12 11:36 mikelorrey New Issue
2016-11-12 12:17 UbitUmarov Note Added: 0031274
2017-02-04 13:43 Ferd Frederix Note Added: 0031580
2017-03-22 13:59 Ferd Frederix Note Added: 0031655
2017-04-08 23:30 Ferd Frederix Note Deleted: 0031655
2017-04-08 23:31 Ferd Frederix Note Edited: 0031580 View Revisions


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker