2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-01-11 19:32:51 +00:00
|
|
|
/*
|
2015-09-28 15:11:53 +00:00
|
|
|
* Author: KoffeinFlummi, commy2
|
|
|
|
* Forces a civilian to the ground with a chance of failure.
|
2015-01-11 23:13:47 +00:00
|
|
|
*
|
2015-01-11 19:32:51 +00:00
|
|
|
* Arguments:
|
2015-05-09 02:47:15 +00:00
|
|
|
* 0: Unit <OBJECT>
|
2015-09-28 16:06:25 +00:00
|
|
|
* 1: Target <OBJECT>
|
2015-01-11 19:32:51 +00:00
|
|
|
*
|
2015-09-28 16:06:25 +00:00
|
|
|
* Return Value:
|
2015-05-09 02:47:15 +00:00
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2015-09-28 15:11:53 +00:00
|
|
|
* [civillian] call ace_interaction_fnc_getDown
|
2015-05-09 02:47:15 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
2015-01-11 19:32:51 +00:00
|
|
|
*/
|
|
|
|
|
2015-09-28 15:11:53 +00:00
|
|
|
#define SEND_RADIUS 10
|
2015-01-11 19:32:51 +00:00
|
|
|
|
2015-09-28 16:06:25 +00:00
|
|
|
params ["_unit", "_target"];
|
2015-01-11 19:32:51 +00:00
|
|
|
|
2016-07-12 14:16:01 +00:00
|
|
|
[_unit, "GestureGo"] call EFUNC(common,doGesture);
|
2015-01-11 19:32:51 +00:00
|
|
|
|
2024-04-06 18:57:08 +00:00
|
|
|
private _chance = [0.5, 0.8] select (weapons _unit isNotEqualTo []);
|
2015-01-11 19:32:51 +00:00
|
|
|
|
|
|
|
{
|
2024-04-06 18:57:08 +00:00
|
|
|
if (weapons _x isEqualTo [] && {random 1 < _chance}) then {
|
2016-05-25 18:23:53 +00:00
|
|
|
[QGVAR(getDown), [_x], [_x]] call CBA_fnc_targetEvent;
|
2015-09-28 15:11:53 +00:00
|
|
|
};
|
2024-04-04 11:15:26 +00:00
|
|
|
} forEach (_target nearEntities ["Civilian", SEND_RADIUS]);
|