agents
From Bohemia Interactive Community
Click on the images for descriptions
Introduced in
- Game:
- Arma 2
- Version:
- 1.00
Description
- Description:
- Return a list of agents in the current mission.
Syntax
- Syntax:
- agents
- Return Value:
- Array of Team Members
Examples
Additional Information
- Multiplayer:
- -
- See also:
- agentcreateAgentisAgentforEachMemberAgententitiesallCuratorsallGroupsallDeadplayableUnitsswitchableUnitsvehiclesallUnitsUAVallDeadMen
Notes
Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To
Add New Note | How To
Notes
- Posted on April 4, 2012 - 10:48 (GMT)
- Rocket
- Note that agents returns a reference to the agent itself, not the object. For example: {alive _x} count agents; would return an error. But you can assign the agent a reference using setVariable, and then reference it, for example: {alive (_x getVariable ["agentObject",objNull]) count agents; would return the number of agents still alive - BUT you would need to define "agentObject" after you create the agent, for example:
_agent = createAgent [_type, _position, [], _radius, "NONE"];_agent setVariable["agentObject",_agent,true];
- Posted on August 1, 2013 - 21:55 (GMT)
- Killzone_Kid
- Alternatively, to get object from agent reference use agent command.