| 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. Sensor Types Unit.SensorType = {
OPTIC = 0,
RADAR = 1,
IRST = 2,
RWR = 3
}
Sensor Sub categories Optic Types Unit.OpticType = {
TV = 0, --TV-sensor
LLTV = 1, --Low-level TV-sensor
IR = 2 --Infra-Red optic sensor
}
Radar Types Unit.RadarType = {
AS = 0, --air search radar
SS = 1 --surface/land search radar
}
| ||
| 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 | ||
| Notes: | |||
