2015-06-04 15:51:04 +00:00
|
|
|
/*
|
|
|
|
* Author: Rocko, Ruthberg
|
|
|
|
*
|
|
|
|
* Dismounts the concertina wire
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: wire <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
2015-08-09 00:19:34 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
2015-06-04 15:51:04 +00:00
|
|
|
*/
|
2015-06-04 15:11:09 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2017-05-31 21:09:36 +00:00
|
|
|
params ["_wire"];
|
2015-06-04 15:11:09 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
_wire animate [_x, 1];
|
2015-08-09 00:19:34 +00:00
|
|
|
} count WIRE_FAST;
|
2015-06-04 15:11:09 +00:00
|
|
|
|
|
|
|
[{
|
2015-08-09 00:19:34 +00:00
|
|
|
params ["_args", "_idPFH"];
|
|
|
|
_args params ["_wire"];
|
|
|
|
|
2015-06-04 15:11:09 +00:00
|
|
|
if (_wire animationPhase "wire_2" == 1) then {
|
|
|
|
private ["_dir", "_pos", "_wirecoil"];
|
2015-08-09 00:19:34 +00:00
|
|
|
|
2015-06-04 15:11:09 +00:00
|
|
|
_dir = getDir _wire;
|
|
|
|
_pos = getPosASL _wire;
|
2015-08-09 00:19:34 +00:00
|
|
|
|
2015-06-04 15:11:09 +00:00
|
|
|
_wirecoil = "ACE_ConcertinaWireCoil" createvehicle [0, 0, 0];
|
|
|
|
|
|
|
|
deleteVehicle _wire;
|
2015-08-09 00:19:34 +00:00
|
|
|
|
2015-06-04 15:11:09 +00:00
|
|
|
_wirecoil setDir _dir;
|
|
|
|
_wirecoil setPosASL _pos;
|
|
|
|
_wirecoil setVelocity [0, 0, 0];
|
2015-08-09 00:19:34 +00:00
|
|
|
|
|
|
|
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
2015-06-04 15:11:09 +00:00
|
|
|
};
|
|
|
|
}, 0, [_wire]] call CBA_fnc_addPerFrameHandler;
|