mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
981a8ea352
* Hunter Killer (Commander Override) - Initial Demo * Just do a one-time slew * Update fnc_eachFrame.sqf * Update addons/hunterkiller/functions/script_component.hpp Co-authored-by: jonpas <jonpas33@gmail.com> * Update for ArmA 2.08 * cleanup * Rework Observe / Control configs * Add to all 2035 tanks * Update script_component.hpp * Use eyeDirection on commander turrets * Update docs/wiki/framework/hunterkiller-framework.md Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com> * Add to all 2035, support ture/false setVars * remove from apcs because mods don't know how to do inheritance Co-authored-by: jonpas <jonpas33@gmail.com> Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
33 lines
950 B
Plaintext
33 lines
950 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: PabstMirror
|
|
* Slews turret to target pos and shows visual feedback
|
|
*
|
|
* Arguments:
|
|
* 0: Vehicle <OBJECT>
|
|
* 1: Turret (will be local) <ARRAY>
|
|
* 2: Look PosASL <ARRAY>
|
|
* 3: Override <BOOL>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [vehicle, [0], [0,0,0], true] call ace_hunterkiller_fnc_slew
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_vehicle", "_turret", "_posASL", "_isOverride"];
|
|
TRACE_4("slew",_vehicle,_turret,_posASL,_isOverride);
|
|
|
|
_vehicle lockCameraTo [_posASL, _turret, true];
|
|
|
|
if (hasInterface && {(_vehicle turretUnit _turret) isEqualTo ace_player}) then {
|
|
private _displayText = if (_isOverride) then { LLSTRING(override) } else { LLSTRING(observe) };
|
|
QGVAR(text) cutText [format ["<br/><br/><br/><br/><br/><t color='#ff0000' size='1.25'>[%1]</t>", _displayText], "PLAIN", -1, false, true];
|
|
[{
|
|
QGVAR(text) cutText ["", "PLAIN"];
|
|
}, [], 1] call CBA_fnc_waitAndExecute;
|
|
};
|