2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-06-05 07:34:27 +00:00
|
|
|
/*
|
|
|
|
* Author: Rocko, Ruthberg
|
|
|
|
* Pick up spotting scope
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: spotting scope <OBJECT>
|
|
|
|
* 1: unit <OBJECT>
|
|
|
|
*
|
2016-06-18 09:50:41 +00:00
|
|
|
* Return Value:
|
2015-06-05 07:34:27 +00:00
|
|
|
* None
|
2015-08-07 09:47:23 +00:00
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [spotting_scope, player] call ace_spottingscope_fnc_pickup
|
|
|
|
*
|
|
|
|
* Public: No
|
2015-06-05 07:34:27 +00:00
|
|
|
*/
|
|
|
|
|
2015-08-07 09:47:23 +00:00
|
|
|
params ["_spottingScope", "_unit"];
|
2015-06-05 07:34:27 +00:00
|
|
|
|
|
|
|
if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then {
|
2015-06-05 08:32:55 +00:00
|
|
|
_unit playMove "AmovPercMstpSrasWrflDnon_diary";
|
2015-06-05 07:34:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
[{
|
2015-08-07 09:47:23 +00:00
|
|
|
params ["_spottingScope", "_unit"];
|
|
|
|
|
2015-06-05 08:32:55 +00:00
|
|
|
[_unit, "ACE_SpottingScope"] call EFUNC(common,addToInventory);
|
2015-06-05 07:34:27 +00:00
|
|
|
deleteVehicle _spottingScope;
|
2016-05-22 13:27:24 +00:00
|
|
|
}, [_spottingScope, _unit], 1, 0]call CBA_fnc_waitAndExecute;
|