DCS func hasAttribute

From DCS World Wiki - Hoggitworld.com
Revision as of 23:56, 20 March 2022 by Grimes (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Scripting Root

Envrioment: Mission Scripting
Function: hasAttribute Added with: 1.2.0
Member Of: Object
Syntax: boolean Object.hasAttribute(Class Self , string attribute )
Description: Returns a boolean value if the object in question has the passed attribute. See Article list of Attributes or db_attibutes.lua in C:\Program Files\Eagle Dynamics\DCS World\Scripts\Database for more details. Additionally attributes for each object are defined within their DB lua file. DB files provided on github for reference.

Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase


Return Value: boolean
Return Example: true or false
Examples:
Related Functions: Object Functions: isExist, destroy, getCategory, getTypeName, getDesc, hasAttribute, getName, getPoint, getPosition, getVelocity, inAir
Notes: