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
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [wire] call ace_concertina_wire_fnc_dismountSuccess
|
|
|
|
*
|
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 {
|
2015-08-09 00:19:34 +00:00
|
|
|
|
2017-10-10 14:39:59 +00:00
|
|
|
private _dir = getDir _wire;
|
|
|
|
private _pos = getPosASL _wire;
|
2015-08-09 00:19:34 +00:00
|
|
|
|
2017-10-10 14:39:59 +00:00
|
|
|
private _wirecoil = "ACE_ConcertinaWireCoil" createvehicle [0, 0, 0];
|
2015-06-04 15:11:09 +00:00
|
|
|
|
|
|
|
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;
|