mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
32 lines
802 B
Plaintext
32 lines
802 B
Plaintext
/*
|
|
* Author: Glowbal
|
|
* Action for loading an unconscious or dead unit in the nearest vechile
|
|
*
|
|
* Arguments:
|
|
* 0: The medic <OBJECT>
|
|
* 1: The patient <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
private "_vehicle";
|
|
params ["_caller", "_target"];
|
|
|
|
if ([_target] call EFUNC(common,isAwake)) exitwith {
|
|
// TODO localization
|
|
["displayTextStructured", [_caller], [["This person (%1) is awake and cannot be loaded", [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
|
|
};
|
|
if ([_target] call FUNC(isBeingCarried)) then {
|
|
_this call EFUNC(dragging,dropObject_carry);
|
|
};
|
|
if ([_target] call FUNC(isBeingDragged)) then {
|
|
_this call EFUNC(dragging,dropObject);
|
|
};
|
|
|
|
_vehicle = _this call EFUNC(common,loadPerson);
|