-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
70 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
_thisUnit = _this select 0; | ||
_thisShooter = _this select 1; | ||
|
||
deleteWaypoint [group _thisUnit, all]; | ||
_thisUnit unassignVehicle (vehicle _thisUnit); | ||
_thisUnit leaveVehicle (vehicle _thisUnit); | ||
_thisUnit disableAI "FSM"; | ||
|
||
_relDir = [_thisUnit,_thisShooter] call BIS_fnc_relativeDirTo; | ||
_building = nearestObjects [_thisUnit, ["House", "Building"], 100] select 0; | ||
if (!isNull _building) then { | ||
_buildingPosition = [_building] call BIS_fnc_buildingPositions; | ||
}; | ||
|
||
|
||
//hintSilent format ["%1",_bla select 0]; | ||
if (count _buildingPosition > 0) then { | ||
_thisUnit setBehaviour "SAFE"; | ||
_pos = [_buildingPosition] call BIS_fnc_selectRandom; | ||
_thisUnit doMove _pos; | ||
_thisUnit setSpeedMode "FULL"; | ||
_thisUnit forceSpeed 25; | ||
_thisUnit playMove "AmovPercMevaSnonWnonDf"; | ||
_thisUnit setVariable ["fleeing", "true"]; | ||
waitUntil { | ||
_thisUnit distance _pos < 2 | ||
}; | ||
|
||
_thisUnit playMoveNow 'AinvPknlMstpSnonWnonDnon_1'; | ||
_thisUnit stop true; | ||
_thisUnit disableAI "autoTarget"; | ||
_thisUnit disableAI "MOVE"; | ||
_thisUnit removeAllEventHandlers "FiredNear"; | ||
|
||
} else { | ||
_pos = [_thisUnit,[5,20],_relDir-180] call SHK_pos; | ||
_thisUnit doMove _pos; | ||
_thisUnit setSpeedMode "FULL"; | ||
_thisUnit forceSpeed 20; | ||
_thisUnit playMove "AmovPercMevaSnonWnonDf"; | ||
_thisUnit setVariable ["fleeing", "true"]; | ||
waitUntil { | ||
_thisUnit distance _pos < 2 | ||
}; | ||
|
||
_thisUnit playMoveNow 'AinvPknlMstpSnonWnonDnon_1'; | ||
_thisUnit stop true; | ||
_thisUnit disableAI "autoTarget"; | ||
_thisUnit disableAI "MOVE"; | ||
_thisUnit removeAllEventHandlers "FiredNear"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters