From Second Life Wiki
Jump to navigation Jump to search


Function: key llRequestSimulatorData( string region, integer data );

Requests data about region. When data is available the dataserver event will be raised.
Returns a handle (a key) for a dataserver event response.

• string region Case sensitive region name.
• integer data DATA_* flag

data Constant Type Description
DATA_SIM_POS 5 (vector) The regions global position.
DATA_SIM_STATUS 6 string Value Description
"up" region currently up and running
"down" region currently down
"starting" region currently starting
"stopping" region currently stopping
"crashed" region has crashed
"unknown" region status unknown or unknown region
DATA_SIM_RATING 7 string Value Maturity rating
"PG" Parcel lght G.png General
"MATURE" Parcel lght M.png Moderate
"ADULT" Parcel lght A.png Adult
"UNKNOWN" rating or region unknown


  • This function causes the script to sleep for 1.0 seconds.
  • There is no DATA_SIM_MAXPRIMS flag (but llGetEnv("region_product_name") returns the region type). SVC-4921
All Issues ~ Search JIRA for related Bugs


Hide objects in PG or unknown regions

key         gRateingQuery       =   NULL_KEY        ;

    llSetLinkAlpha( LINK_SET, 1.0, ALL_SIDES );

     llSetLinkAlpha( LINK_SET, 0.0, ALL_SIDES );

    on_rez(integer Setting)
        gRateingQuery = llRequestSimulatorData( llGetRegionName(), DATA_SIM_RATING );
    changed(integer ItChanged)
        if (ItChanged & CHANGED_OWNER)      llResetScript();
        if (ItChanged & CHANGED_REGION)     llResetScript();
    dataserver(key query_id, string data)
        if (query_id == gRateingQuery)
            if (data == "MATURE" || data == "ADULT")        show();
            else if (data == "UNKNOWN" || data == "PG")     hide();


Global Position in meters

See Also

Deep Notes

All Issues

~ Search JIRA for related Issues
   Script dataserver events become permanently blocked until sim restart
   Please add a way to get the region type ("full", "homestead", "openspace") to llRequestSimulatorData
   llRequestSimulatorData for DATA_SIM_POS returns same position for multiple regions


•  llRequestSimulatorData Test


function key llRequestSimulatorData( string region, integer data );