2015-01-12 09:07:03 +00:00
|
|
|
/*
|
2015-01-12 10:24:58 +00:00
|
|
|
Name: ACE_Respawn_fnc_removeBody
|
2015-04-10 11:21:52 +00:00
|
|
|
|
2015-01-12 10:24:58 +00:00
|
|
|
Author(s):
|
|
|
|
bux578
|
2015-04-10 11:21:52 +00:00
|
|
|
|
2015-01-12 10:24:58 +00:00
|
|
|
Description:
|
|
|
|
removes a given body
|
2015-04-10 11:21:52 +00:00
|
|
|
|
2015-01-12 10:24:58 +00:00
|
|
|
Parameters:
|
|
|
|
0: OBJECT - body
|
|
|
|
1: BOOLEAN - forceRemove // not used atm
|
2015-04-10 11:21:52 +00:00
|
|
|
|
2015-01-12 10:24:58 +00:00
|
|
|
Returns:
|
|
|
|
VOID
|
|
|
|
*/
|
2015-01-12 09:07:03 +00:00
|
|
|
|
2015-01-12 10:24:58 +00:00
|
|
|
#include "script_component.hpp"
|
2015-04-10 11:21:52 +00:00
|
|
|
|
2015-01-12 09:07:03 +00:00
|
|
|
private ["_body", "_forceRemove", "_bodyRemoveTimer"];
|
|
|
|
|
|
|
|
_body = _this select 0;
|
|
|
|
_forceRemove = _this select 1;
|
|
|
|
|
2015-01-12 09:49:21 +00:00
|
|
|
_bodyRemoveTimer = GVAR(BodyRemoveTimer) max 0;
|
2015-01-12 09:07:03 +00:00
|
|
|
|
|
|
|
// could be used for SpecOps missions.
|
|
|
|
if (_forceRemove) then {
|
|
|
|
_bodyRemoveTimer = 2;
|
|
|
|
};
|
|
|
|
|
2015-04-10 13:23:27 +00:00
|
|
|
[
|
|
|
|
{
|
|
|
|
// hideBody takes ~20s till body is fully underground
|
|
|
|
// a better hideBody would make this more aesthetic
|
|
|
|
deleteVehicle _this;
|
|
|
|
},
|
|
|
|
_body,
|
|
|
|
_bodyRemoveTimer,
|
|
|
|
1
|
|
|
|
] call EFUNC(common,waitAndExecute);
|