Skip to content
lsl.devlsl.devLSL Dev

LlRequestSimulatorData

Looking for the current API? Open the llRequestSimulatorData reference →

Wiki description

Requests data about region. When data is available the dataserver event will be raised.

Return value notes

Returns a key for a dataserver event response.

Specification

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" mrg: {{mrg}}
"MATURE" mrm: {{mrm}}
"ADULT" mra: {{mra}}
"UNKNOWN" rating or region unknown

Caveats

  • There is no DATA_SIM_MAXPRIMS flag (but llGetEnv("region_product_name") returns the region type). SVC-4921

Examples

Hide objects in PG or unknown regions
key         gRateingQuery       =   NULL_KEY        ;

show()
{
    llSetLinkAlpha( LINK_SET, 1.0, ALL_SIDES );
}//show

hide()
{
     llSetLinkAlpha( LINK_SET, 0.0, ALL_SIDES );
}//hide

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

Notes

Global Position in meters

See also: functions

Tests

Shared wiki helpers

The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.

Template:Issues/SVC-2596

Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|SVC-2596|Script [[dataserver]] events become permanently blocked until sim restart|type=bug|resolution=fixed}}

Template:Issues/SVC-4921

Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|SVC-4921|Please add a way to get the region type ("full", "homestead", "openspace") to llRequestSimulatorData|type=nf|resolution=wont|status=clo}}

Template:Issues/BUG-5031

Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|BUG-5031|[[llRequestSimulatorData]] for [[DATA_SIM_POS]] returns same position for multiple regions|type=bug|dnc=*}}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.