Difference between revisions of "DCS func hasSensors"

From DCS World Wiki - Hoggitworld.com
Line 16: Line 16:
 
Some sensorTypes have additional subcategories which can be used to further specify for certain sensors.  
 
Some sensorTypes have additional subcategories which can be used to further specify for certain sensors.  
  
For all sensor information please check [[DCS_enum_unit_enums|the article on sensor enumerators]] for more details.  
+
For all sensor information please check [[DCS_enum_unit|the article on sensor enumerators]] for more details.  
  
  

Revision as of 22:20, 4 February 2022

Scripting Root

Envrioment: Mission Scripting
Function: hasSensors Added with: 1.2.0
Member Of: Unit
Syntax: boolean Unit.hasSensors(Class Self , enum SensorType, enum SubCategory)
Description: Returns true if the unit has the specified sensors. If SensorType is not specified the function will return true if the unit has any type of sensors.

Some sensorTypes have additional subcategories which can be used to further specify for certain sensors.

For all sensor information please check the article on sensor enumerators for more details.


Return Value: boolean
Return Example: true or false
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: