llGetRegionAgentCount
function
Function syntax
integer llGetRegionAgentCount();- Returns
integer- Energy
- 10
Returns an integer representing the current number of avatars in the region.
Returns an integer that is the number of avatars in the region.
integer result = llGetRegionAgentCount();Caveats
Section titled “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
Section titled “Examples”Example 1
default{ touch_start(integer num_detected) { integer numberOfAvatarsInSim = llGetRegionAgentCount(); llSay(0, "There are currently " + (string) numberOfAvatarsInSim + " avatars in this sim."); }}History
Section titled “History”- Introduced in SVN:568 r88085 Branch:Release Wednesday, 21 May 2008
- Date of Release 16-10-2008
See also
Section titled “See also”Functions
Section titled “Functions”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.