mirror of
https://github.com/Teh-Dango/Sarge-AI.git
synced 2024-08-30 16:32:11 +00:00
65e4453908
Major Update. Now supporting DesolationRedux, Epoch and Exile.
31 lines
794 B
Plaintext
31 lines
794 B
Plaintext
/****************************************************************
|
|
File: UPSMON_avoidDissembark.sqf
|
|
Author: MONSADA
|
|
|
|
Description:
|
|
If every on is outside, make sure driver can move
|
|
Parameter(s):
|
|
<--- leader
|
|
Returns:
|
|
Nothing
|
|
****************************************************************/
|
|
private["_npc","_vehicle","_timeout"];
|
|
|
|
_npc = _this select 0;
|
|
_vehicle = vehicle _npc;
|
|
|
|
_timeout = 120;
|
|
_timeout = time + _timeout;
|
|
|
|
while {_npc == vehicle _npc && alive _npc && canmove _npc && time < _timeout} do {
|
|
sleep 1;
|
|
};
|
|
|
|
if (!alive _npc || !canmove _npc || time >= _timeout || driver vehicle _npc == _npc) exitwith{};
|
|
_npc stop true;
|
|
|
|
while {_npc != vehicle _npc && alive _npc && canmove _npc} do {sleep 1;};
|
|
_npc stop false;
|
|
sleep 0.5;
|
|
|
|
if (!alive _npc || !canmove _npc) exitwith{}; |