Difference between revisions of "LlGetRegionAgentCount"

From Second Life Wiki
Jump to navigation Jump to search
m (some readability improvements)
m (added date of release)
Line 33: Line 33:
|also_articles
|also_articles
|notes
|notes
|history=Introduced in {{SVN|568|rev=88085|branch=Release|anchor=file33|date=Wednesday, 21 May 2008}}
|history=
*Introduced in {{SVN|568|rev=88085|branch=Release|anchor=file33|date=Wednesday, 21 May 2008}}
*Date of Release [[ Release_Notes/Second_Life_Release/1.21 | 16-10-2008 ]]
|cat1=Region
|cat1=Region
|cat2
|cat2

Revision as of 20:52, 15 January 2014

Summary

Function: integer llGetRegionAgentCount( );

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.
All Issues ~ Search JIRA for related Bugs

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

Deep Notes

History

Search JIRA for related Issues

Signature

function integer llGetRegionAgentCount();