ACE3/addons/trenches/functions/fnc_camouflageTrench.sqf
Cyruz 1a95070b80
Trenches - Add camouflage action using surfaceTexture (#8935)
* Port 7833 to use surfaceTexture
* Add camo action
* Remove unused args from statement call
* Rogue missing space
* Add animation + delay for camo action
* Add authors
2022-07-15 15:42:00 +01:00

27 lines
524 B
Plaintext

#include "script_component.hpp"
/*
* Author: Cyruz
* Apply surfaceTexture to a completed trench.
*
* Arguments:
* 0: Trench <OBJECT>
* 1: Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [TrenchObj, ACE_player] call ace_trenches_fnc_camouflageTrench
*
* Public: No
*/
params ["_trench", "_unit"];
_unit playActionNow "PutDown";
[{
_this setObjectTextureGlobal [0, surfaceTexture getPosATL _this];
_this setVariable [QGVAR(camouflaged), true, true];
}, _trench, 2] call CBA_fnc_waitAndExecute;