DCS func getGroup

From DCS World Wiki - Hoggitworld.com
Revision as of 01:45, 26 January 2023 by Loophole 62ndFF (talk | contribs)

Scripting Root

Envrioment: Mission Scripting
Function: getGroup Added with: 1.2.0
Member Of: Unit
Syntax: Group Unit.getGroup(Class Self )
Description: Returns the Group object that the Unit belongs to.


Return Value: Group
Return Example:
Examples:
Related Functions: Unit Functions: isActive, getPlayerName, getID, getNumber, getCategoryEx, getObjectID, getController, getGroup, getCallsign, getLife, getLife0, getFuel, getAmmo, getSensors, hasSensors, getRadar, getDrawArgumentValue, getNearestCargos, enableEmission, getDescentCapacity

Object Functions: isExist, destroy, getCategory, getTypeName, getDesc, hasAttribute, getName, getPoint, getPosition, getVelocity, inAir

Coalition Object Functions: getCoalition, getCountry

Notes: Due to a bug client groups are not accessible at present 1.5.3 and 2.0.2.

In version 2.8.2, unit:getGroup() will return nil if the unit is a ground unit that is dead (this includes units referenced in UNIT_LOST and DEAD events). It might return nil for air units as well, depending on timing of the events.