OsGetRegionStats

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
{{Quicklinks}}
+
{{osslfunc|
{| width="100%" style="border: thin solid black"
+
threat_level = Moderate
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
+
|
|- valign="top"
+
function_syntax = <source lang="lsl">
|'''Threat Level''' || Moderate
+
 
+
|- valign="top"
+
|'''Function Syntax''' || <source lang="lsl">
+
 
LSL: list osGetRegionStats()
 
LSL: list osGetRegionStats()
 
C#: LSL_List osGetRegionStats()
 
C#: LSL_List osGetRegionStats()
 
</source>
 
</source>
|- valign="top"
+
|
|'''Example(s)||<source lang="lsl">
+
ossl_example = <source lang="lsl">
 
// llGetRegionStats() example script
 
// llGetRegionStats() example script
 
//
 
//
Line 37: Line 33:
 
     }
 
     }
 
}</source>
 
}</source>
 
+
|  
 
+
additional_info = Returns a list of float values representing a number of region statistics (many of the values shown in the "Stats Bar" of LL-based clients). Provides similar functionality to llGetRegionFPS() and llGetRegionTimeDilation(), but returns 21 statistics simultaneously.
|}
+
 
+
Returns a list of float values representing a number of region statistics (many of the values shown in the "Stats Bar" of LL-based clients). Provides similar functionality to llGetRegionFPS() and llGetRegionTimeDilation(), but returns 21 statistics simultaneously.
+
  
 
The elements in the list may be referred to by the following new LSL constants:
 
The elements in the list may be referred to by the following new LSL constants:
Line 105: Line 98:
  
 
Code provided by Implementor:&nbsp; Godfrey and Implemented in Git Hash 9d05962029fe864408d287d5fa7ef81f312e098a, - Rev 11601  
 
Code provided by Implementor:&nbsp; Godfrey and Implemented in Git Hash 9d05962029fe864408d287d5fa7ef81f312e098a, - Rev 11601  
 
+
|
[[Category:OSSL Functions]]
+
}}

Revision as of 16:13, 12 June 2011

LSL: list osGetRegionStats()
C#: LSL_List osGetRegionStats()
No descriptions provided
Threat Level Moderate
Permissions No permissions specified
Extra Delay No function delay specified
Example(s)
// llGetRegionStats() example script
//
// Displays certain region statistics in hovertext above the prim containing the script.
//
default
{
    state_entry()
    {
        llSetTimerEvent( 5.0 );
    }
 
    timer()
    {
        list Stats = osGetRegionStats();
        string s = "Sim FPS: " + (string) llList2Float( Stats, STATS_SIM_FPS ) + "\n";
        s += "Physics FPS: " + (string) llList2Float( Stats, STATS_PHYSICS_FPS ) + "\n";
        s += "Time Dilation: " + (string) llList2Float( Stats, STATS_TIME_DILATION ) + "\n";
        s += "Root Agents: " + (string) llList2Integer( Stats, STATS_ROOT_AGENTS ) + "\n";
        s += "Child Agents: " + (string) llList2Integer( Stats, STATS_CHILD_AGENTS ) + "\n";
        s += "Total Prims: " + (string) llList2Integer( Stats, STATS_TOTAL_PRIMS ) + "\n";
        s += "Active Scripts: " + (string) llList2Integer( Stats, STATS_ACTIVE_SCRIPTS ) + "\n";
        s += "Script LPS: " + (string) llList2Float( Stats, STATS_SCRIPT_LPS );
        llSetText( s, <0.0,1.0,0.0>, 1.0 );
    }
}
Notes
Returns a list of float values representing a number of region statistics (many of the values shown in the "Stats Bar" of LL-based clients). Provides similar functionality to llGetRegionFPS() and llGetRegionTimeDilation(), but returns 21 statistics simultaneously.

The elements in the list may be referred to by the following new LSL constants:

{

Personal tools
General
About This Wiki