llGetRegionAgentCount
Revision as of 11:21, 22 October 2012 by Kireji Haiku (talk | contribs) (some readability improvements)
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: integer llGetRegionAgentCount( );0.0 | Forced Delay |
10.0 | Energy |
Returns an integer that is the number of avatars in the region.
Caveats
- The value returned by this function is technically the average number of agents who were in the region for the past second, rounded to the nearest integer. This means that there is a slight (<1 second) delay in agent count when an agent enters or exits a region.
Examples
<lsl> default {
touch_start(integer num_detected) { integer numberOfAvatarsInSim = llGetRegionAgentCount();
// PUBLIC_CHANNEL has the integer value 0
llSay(PUBLIC_CHANNEL, "Hello, currently there are " + (string)numberOfAvatarsInSim + " avatars in my sim."); }
}
</lsl>See Also
Functions
• | llGetAgentList | |||
• | llGetRegionFPS | |||
• | llGetRegionTimeDilation |