Cài đặt Steam
Đăng nhập
|
Ngôn ngữ
简体中文 (Hán giản thể)
繁體中文 (Hán phồn thể)
日本語 (Nhật)
한국어 (Hàn Quốc)
ไทย (Thái)
Български (Bungari)
Čeština (CH Séc)
Dansk (Đan Mạch)
Deutsch (Đức)
English (Anh)
Español - España (Tây Ban Nha - TBN)
Español - Latinoamérica (Tây Ban Nha cho Mỹ Latin)
Ελληνικά (Hy Lạp)
Français (Pháp)
Italiano (Ý)
Bahasa Indonesia (tiếng Indonesia)
Magyar (Hungary)
Nederlands (Hà Lan)
Norsk (Na Uy)
Polski (Ba Lan)
Português (Tiếng Bồ Đào Nha - BĐN)
Português - Brasil (Bồ Đào Nha - Brazil)
Română (Rumani)
Русский (Nga)
Suomi (Phần Lan)
Svenska (Thụy Điển)
Türkçe (Thổ Nhĩ Kỳ)
Українська (Ukraine)
Báo cáo lỗi dịch thuật
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.
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";
};