Arma 3
Overthrow [Outdated]
Zothen 2017년 1월 17일 오전 5시 42분
AI unstuck/reset?
Hello.
My AIs get stuck sometimes in structures, rocks, etc and I found no way to get the properly out of there.
Can you please add an unstuck and/or "reset to base" command?
Thankies.
< >
전체 댓글 3개 중 1~3개 표시 중
TiKlon 2017년 1월 19일 오전 12시 10분 
Or dismiss or sell, I have like 7 or 8 teams stuck, the worst thing is that all number 3 comes without ammo, and the team leader keeps saying "...3 , reload" every 5 minutes
Swagmaster Love 🇪🇺 2017년 4월 23일 오전 4시 38분 
My AIs get constantly stuck over and over again and refuse to do anything.

Is there a solution to this?
It's borderline gamebreaking for me.

I'd rather have retarded AI over an AI script that has a chance of disabling an AI every 5 minutes.
Swagmaster Love 🇪🇺 님이 마지막으로 수정; 2017년 4월 23일 오전 4시 39분
RickOShay 2017년 11월 25일 오전 1시 18분 
Occasionally AI team mates will get stuck either by glitching through terrain mesh or map object. This can be a mission breaker - especially where group player array count is used.
A way around this is to use a trigger for each npc character that checks the distance the AI unit is from the human team leader - player. Then when the distance is exceeded it teleports them to a random distance behind the player position and set the direction.

Here's a simple script that fixes that - it's the latest version and seems to work in most situations. Tested and evolved over a few years of experimentation.

To setup create one trigger per unit in Eden editor. Doesn't matter that some units will be players- trigger cond and script exits if unit == player. In this instance all units are named p1,p2,p3,p4..... with p1 the group leader and player. Save the script into your scripts folder under your mission folder.

Example Trigger:

Size: NA
Activation: Repeatable

Condition:
!isPlayer p2 && (p2 distance player) >= 120

Trigger: On Activation: (call the script)
null = [p2] execvm "scripts\aistuck.sqf";

ie. you're calling the script for each AI unit via a separate trigger passing the unit name to the script.

Create script in mission scripts folder and put this into it:

// AIstuck - By RickOSHay
// Teleports AI to group leader that are stuck or fall behind
// Where units are named p1,p2,p3.... P1 is player and group leader
// called via repeatable trigger:
// cond: ie.: !isPlayer p2 && p2 distance leader p2 >= 150;
// activation: nul = [p2] execvm "scripts\aistuck.sqf"; and so on for each trigger and unit.

_unit = _this select 0;
_Gleader = leader _unit;
_dir = direction _Gleader;
_pos = getposATL _Gleader;
_group = group _Gleader;

//if (isPlayer _unit) exitWith {};
if (!isnull _Gleader && isTouchingGround _Gleader && (_pos select 2 < 1)) then {
sleep 0.5;
// adjust the following condition if you don't want the AI to auto populate the vehicle you get
// into. ie. change to whole line below to: if (_Gleader == vehicle _Gleader) then {

if (_Gleader != vehicle _Gleader) then {_x moveInAny vehicle _Gleader} else {
_initpos = (_Gleader getPos [5 + random 10, direction _Gleader - 180]);
_pos = [_initpos, 2, 5, 3, 0, 20, 0] call BIS_fnc_findSafePos;
_unit setPosATL [_pos select 0, _pos select 1, 0];
_unit setDir _dir;
_unit switchMove "";
};

{[_x] joinsilent _group} foreach [p1,p2,p3,p4,p5,p6,p7,p8];
_group setFormation "wedge";
_unit setUnitPos "up";

};
RickOShay 님이 마지막으로 수정; 2017년 11월 25일 오전 1시 22분
< >
전체 댓글 3개 중 1~3개 표시 중
페이지당 표시 개수: 1530 50