missileState: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(Add examples)
Line 7: Line 7:
|gr1= Weapons
|gr1= Weapons


|descr= Returns engine, target lock and flight profile states of the given guided missile.
|descr= Get the provided ''guided'' missile's engine, target lock and flight profile states.


|s1= [[missileState]] munition
|s1= [[missileState]] munition
Line 13: Line 13:
|p1= munition: [[Object]] - missile
|p1= munition: [[Object]] - missile


|r1= [[Array]] - in format [engineState, lockState, flightState], where:<br>
|r1= [[Array]] - in format [engineState, lockState, flightState], where:
* engineState: [[String]] - one of the "INIT", "THRUST", "FLY" or "".<br>
* engineState: [[String]] - one of "INIT", "THRUST", "FLY" or ""
* lockState: [[String]] - one of the "MANUAL", "LOCKED", "LOST", "INITIAL", "SEEKING" or "".
* lockState: [[String]] - one of "MANUAL", "LOCKED", "LOST", "INITIAL", "SEEKING" or ""
* flightState: [[String]] - one of the "DEFAULT", "DIRECT", "TOPDOWN", "LOALDISTANCE", "LOALALTITUDE", "OVERFLY", "CRUISE" or "". LOAL stands for "Lock-on after launch".
* flightState: [[String]] - one of "DEFAULT", "DIRECT", "TOPDOWN", "LOALDISTANCE", "LOALALTITUDE", "OVERFLY", "CRUISE" or "" (LOAL stands for "Lock-On After Launch")


|x1= <sqf>_state = missileState missile1;</sqf>
|x1= <sqf>missileState _myMissile params ["_engineState", "_lockState", "_flightState"];</sqf>
 
|x2= <sqf>
_myHelicopter addEventHandler ["Fired", {
private _projectile = _this select 6;
// or params ["", "", "", "", "", "", "_projectile"];
systemChat str missileState _projectile;
}];
</sqf>


|seealso= [[missileTargetPos]] [[setMissileTargetPos]] [[setMissileTarget]] [[missileTarget]]
|seealso= [[missileTargetPos]] [[setMissileTargetPos]] [[setMissileTarget]] [[missileTarget]]
}}
}}

Revision as of 11:15, 16 July 2024

Hover & click on the images for description

Description

Description:
Get the provided guided missile's engine, target lock and flight profile states.
Groups:
Weapons

Syntax

Syntax:
missileState munition
Parameters:
munition: Object - missile
Return Value:
Array - in format [engineState, lockState, flightState], where:
  • engineState: String - one of "INIT", "THRUST", "FLY" or ""
  • lockState: String - one of "MANUAL", "LOCKED", "LOST", "INITIAL", "SEEKING" or ""
  • flightState: String - one of "DEFAULT", "DIRECT", "TOPDOWN", "LOALDISTANCE", "LOALALTITUDE", "OVERFLY", "CRUISE" or "" (LOAL stands for "Lock-On After Launch")

Examples

Example 1:
missileState _myMissile params ["_engineState", "_lockState", "_flightState"];
Example 2:
_myHelicopter addEventHandler ["Fired", { private _projectile = _this select 6; // or params ["", "", "", "", "", "", "_projectile"]; systemChat str missileState _projectile; }];

Additional Information

See also:
missileTargetPos setMissileTargetPos setMissileTarget missileTarget

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note