2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-03-21 18:32:32 +00:00
|
|
|
/*
|
2015-03-24 04:18:00 +00:00
|
|
|
* Author: esteldunedain
|
2015-03-21 18:32:32 +00:00
|
|
|
* Create one unload action per unconscious passenger
|
|
|
|
*
|
2016-06-18 09:50:41 +00:00
|
|
|
* Arguments:
|
2015-03-21 18:32:32 +00:00
|
|
|
* 0: Vehicle <OBJECT>
|
|
|
|
* 1: Player <OBJECT>
|
|
|
|
* 3: Parameters <ARRAY>
|
|
|
|
*
|
2016-06-18 09:50:41 +00:00
|
|
|
* Return Value:
|
2015-03-21 18:32:32 +00:00
|
|
|
* Children actions <ARRAY>
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [car, kevin, [params]] call ACE_medical_fnc_addUnloadPatientActions
|
|
|
|
*
|
2015-03-21 18:32:32 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
2015-08-22 14:25:10 +00:00
|
|
|
params ["_vehicle", "_player", "_parameters"];
|
2015-03-21 18:32:32 +00:00
|
|
|
|
2016-06-13 08:55:19 +00:00
|
|
|
private _actions = [];
|
2015-03-21 18:32:32 +00:00
|
|
|
|
|
|
|
{
|
2016-06-13 08:55:19 +00:00
|
|
|
private _unit = _x;
|
2015-03-21 18:32:32 +00:00
|
|
|
if (_unit != _player && {(alive _unit) && {_unit getVariable ["ACE_isUnconscious", false]}}) then {
|
|
|
|
_actions pushBack
|
|
|
|
[
|
|
|
|
[
|
|
|
|
str(_unit),
|
|
|
|
[_unit, true] call EFUNC(common,getName),
|
|
|
|
"",
|
2015-08-22 16:33:06 +00:00
|
|
|
{[_player, (_this select 2) select 0] call FUNC(actionUnloadUnit);},
|
2015-03-21 18:32:32 +00:00
|
|
|
{true},
|
|
|
|
{},
|
|
|
|
[_unit]
|
|
|
|
] call EFUNC(interact_menu,createAction),
|
|
|
|
[],
|
|
|
|
_unit
|
|
|
|
];
|
|
|
|
};
|
|
|
|
} forEach crew _vehicle;
|
|
|
|
|
|
|
|
_actions
|