Difference between revisions of "DCS func getCategoryEx"
From DCS World Wiki - Hoggitworld.com
(Created page with "{{Template:dcs_funcs |fName= getCategoryEx |vNum= 2.9.2 |par1= Unit |par2= Airbase |par3= Weapon |par4= D...") |
(No difference)
|
Envrioment: | Mission Scripting | ||
Function: | getCategoryEx | Added with: 2.9.2 | |
Member Of: | Unit, Airbase, Weapon, Group | ||
Syntax: | enum Unit.getCategoryEx(Class Self ) | ||
Description: | Returns an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object and how the function is called.
See enumerators Group.Category, Object.Category, and Spot.Category for further reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. Unit.getCategoryEx(obj) will return the unit category. obj:getCategoryEx() will return the unit category.
| ||
Return Value: | enum | ||
Return Example: | number | ||
Examples: | The following is run on a ship unit named CVN75.
local unit = Unit.getByName("CVN75") env.info(unit:getCategoryEx() -> 3 (unit category for a ship) env.info(Airbase.getCategoryEx(unit) -> 2 (airbase category for a ship) | ||
Related Functions: | Object Functions: isExist, destroy, getCategory, getTypeName, getDesc, hasAttribute, getName, getPoint, getPosition, getVelocity, inAir
Group Functions: isExist, activate, destroy, getCategory, getCoalition, getName, getID, getUnit, getUnits, getSize, getInitialSize, getController, enableEmission Spot Functions: createLaser. createInfraRed, destroy, getCategory, getPoint, setPoint, getCode, setCode | ||
Notes: | Function exists group Group and Spot classes, I have no idea why. |