Difference between revisions of "LlGetEnv"

From Second Life Wiki
Jump to navigation Jump to search
(Add dynamic_pathfinding option to description)
m (changed column order in table)
Line 15: Line 15:
{{!}}-{{Hl2}}
{{!}}-{{Hl2}}
! {{!}} Name
! {{!}} Name
! {{!}} {{HoverText|Typecast|To make the value returned more useful, you will want to typecast it to this type}}
! class="unsortable" {{!}} Description
! class="unsortable" {{!}} Description
! {{!}} {{HoverText|Type to typecast to|To make the value returned more useful, you will want to typecast it to this type}}
{{!}}-
{{!}}-
{{!}} "sim_channel"
{{!}} "sim_channel"
{{!}} align=center {{!}} NA
{{!}} Get the region's [[Het-Grid_FAQ#What_is_a_channel.3F|channel]] string, for example "Second Life Server".
{{!}} Get the region's [[Het-Grid_FAQ#What_is_a_channel.3F|channel]] string, for example "Second Life Server".
{{!}} {{No|N/A}}
{{!}}-
{{!}}-
{{!}} "sim_version"
{{!}} "sim_version"
{{!}} align=center {{!}} NA
{{!}} Get the region's [[Version numbering#Second_Life_Server_Versioning|version number]] string, for example "{{HoverText|10|[2-digit year]}}.{{HoverText|11|[2-digit month]}}.{{HoverText|30|[2-digit day]}}.{{HoverText|215699|[build number]}}".
{{!}} Get the region's [[Version numbering#Second_Life_Server_Versioning|version number]] string, for example "{{HoverText|10|[2-digit year]}}.{{HoverText|11|[2-digit month]}}.{{HoverText|30|[2-digit day]}}.{{HoverText|215699|[build number]}}".
{{!}} {{No|N/A}}
{{!}}-
{{!}}-
{{!}} "frame_number"
{{!}} "frame_number"
{{!}} align=center {{!}} ([[integer]])
{{!}} Get the frame number of the simulator, for example "42042".
{{!}} Get the frame number of the simulator, for example "42042".
{{!}} {{Yes|[[integer]]}}
{{!}}-
{{!}}-
{{!}} "region_idle"
{{!}} "region_idle"
{{!}} align=center {{!}} ([[integer]])
{{!}} Get the region's [http://community.secondlife.com/t5/Second-Life-Server/Region-Idling-FAQ/m-p/1535497 idle] status, "1" or "0".
{{!}} Get the region's [http://community.secondlife.com/t5/Second-Life-Server/Region-Idling-FAQ/m-p/1535497 idle] status, "1" or "0".
{{!}} {{Yes|[[integer]] [http://en.wikipedia.org/wiki/Boolean_algebra_%28logic%29 boolean]}}
{{!}}-
{{!}}-
{{!}} "dynamic_pathfinding"
{{!}} "dynamic_pathfinding"
{{!}} align=center {{!}} ([[integer]])
{{!}} Get the region's dynamic_pathfinding status, "1" or "0". This option is configured in the [[SimConsole|Region Debug Console]]
{{!}} Get the region's dynamic_pathfinding status, "1" or "0". This option is configured in the [[SimConsole|Region Debug Console]]
{{!}} {{Yes|[[integer]]}}
{{!}}}
{{!}}}
</div>
</div>

Revision as of 18:07, 8 December 2012

Summary

Function: string llGetEnv( string name );

Returns a string with the requested data about the region.

• string name The name of the data to request

Note that the value returned is a string, you may need to cast it to an integer for use in calculations.

Table of valid name values.
Name Description Type to typecast to
"sim_channel" Get the region's channel string, for example "Second Life Server". N/A
"sim_version" Get the region's version number string, for example "10.11.30.215699". N/A
"frame_number" Get the frame number of the simulator, for example "42042". integer
"region_idle" Get the region's idle status, "1" or "0". integer boolean
"dynamic_pathfinding" Get the region's dynamic_pathfinding status, "1" or "0". This option is configured in the Region Debug Console integer

Examples

<lsl> default {

   touch_start(integer total_number)
   {
       string version = llGetEnv("sim_version");
       llOwnerSay("Region " + llGetRegionName() + " is running "
                  + llGetEnv("sim_channel") + " version " + version );
       list ver = llParseString2List(version, ["."], []);
       llOwnerSay("Build: "+llList2String(ver, 3));
       llOwnerSay("Build Date: "+llList2String(ver, 2)+"-"+llList2String(ver, 1)+"-20"+llList2String(ver, 0));
   }

}

</lsl>

Notes

  • Region idling lowers a region's framerate when no avatars are currently on or looking into the region. Scripts measuring time dilation with llGetRegionTimeDilation may report significant time dilation if the region is idle.

See Also

Deep Notes

History

  • SVC-4874
  • Introduced in Second Life RC LeTigre 10.11.30.215699, deployed on 2010-12-01.
  • Deployed to rest of Agni with Second Life Server 10.11.30.215699, Second Life RC BlueSteel 10.12.06.216207, Second Life RC Magnum 10.11.30.215699
  • "frame_number" option added in Second Life RC BlueSteel 12.01.03.247042
    • Returns an integer that represents the current 'frame' of the simulator. Generally only useful for specific debugging cases.
  • Removed (temporarily?) in Second Life RC BlueSteel 12.01.06.247303

Search JIRA for related Issues

Signature

function string llGetEnv( string name );