2016-07-15 10:23:47 +00:00
|
|
|
/*
|
|
|
|
* Author: esteldunedain
|
|
|
|
* Create one unload action per unconscious passenger
|
|
|
|
*
|
|
|
|
* Argument:
|
|
|
|
* 0: Vehicle <OBJECT>
|
|
|
|
* 1: Player <OBJECT>
|
2017-06-15 19:35:33 +00:00
|
|
|
* 2: Parameters <ARRAY>
|
2016-07-15 10:23:47 +00:00
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* Children actions <ARRAY>
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
2017-06-15 19:35:33 +00:00
|
|
|
* [car, kevin, [params]] call ACE_medical_treatment_fnc_addUnloadPatientActions
|
2017-06-08 13:31:51 +00:00
|
|
|
*
|
2016-07-15 10:23:47 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
params ["_vehicle", "_player", "_parameters"];
|
|
|
|
|
|
|
|
private _actions = [];
|
|
|
|
|
|
|
|
{
|
|
|
|
private _unit = _x;
|
|
|
|
if (_unit != _player && {(alive _unit) && {_unit getVariable ["ACE_isUnconscious", false]}}) then {
|
|
|
|
_actions pushBack
|
|
|
|
[
|
|
|
|
[
|
|
|
|
str(_unit),
|
|
|
|
[_unit, true] call EFUNC(common,getName),
|
|
|
|
"",
|
|
|
|
{[_player, (_this select 2) select 0] call FUNC(actionUnloadUnit);},
|
|
|
|
{true},
|
|
|
|
{},
|
|
|
|
[_unit]
|
|
|
|
] call EFUNC(interact_menu,createAction),
|
|
|
|
[],
|
|
|
|
_unit
|
|
|
|
];
|
|
|
|
};
|
|
|
|
} forEach crew _vehicle;
|
|
|
|
|
|
|
|
_actions
|