Jump to content
  • 0

[WAI] Make AIs attack armoured vheicles


happyman0073

Question

Hey guys! The question is simple and already included in the title. Can I somehow make the WAI AIs attack armoured vehicles like the BTR-90? Also, how does that rocket launcher stuff work? I enabled the rocket launchers for the missions in the config but there are no NPCs with AT launchers and if I manually add NPCs to spawn with AT launchers for each mission, the launchers don't disappear at death even though I enabled that option in the config, too.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

I don't think it's about the damage they can deal. If you turn out in a APC, they will shoot you and most likely destroy you within 1 minute. Also, when I tried it witht he launchers, they still didn't do shit even if I was like 2m in front of them.

I once played on a server where the AIs attacked you in a BTR-60 although they were normal infantry with assault rifles.

Link to comment
Share on other sites

  • 0

I don't think it's about the damage they can deal. If you turn out in a APC, they will shoot you and most likely destroy you within 1 minute. Also, when I tried it witht he launchers, they still didn't do shit even if I was like 2m in front of them.

I once played on a server where the AIs attacked you in a BTR-60 although they were normal infantry with assault rifles.

 

Can't say I've seen any AI (WAI, DZMS, Sarge, EMS) fire on the more heavily armored vehicles while equipped with 5.56 or 7.62 caliber rifles. I don't even recall them firing on Vodniks. Regarding RPG's, I remember them working when I was messing around with this a while ago...or, could be that old faction issue where AI don't attack players with particular skins.

Link to comment
Share on other sites

  • 0

That is simply how AI in ArmA works. Thats why people equip them with RPGs ;)

Also, no they dont care if youre inside of the vehicle or turned out. They wont't even attack the gunner of an armored Vodnik if they only got assault rifles.

It's not like I'm thinking that they shoot you if you're turned out but don't if you're turned in. That's a fact. Also, as I sayd, I've been on a srever where the AIs attacked you in a BTR-60 with normal assault rifles. And there's still the problem with the AT launchers.

Link to comment
Share on other sites

  • 0

All mission system i've tested have problems with rpgs. Add enough bots with launchers, some of them will use them.
You can also add checks if player is in vehicle and add triggers to damage them if they are to close to the center.

Im using this since month, for my anomalies and radiation zones, works perfectly.

example: should be in a while loop
 

	_array = _pos nearObjects ["Ship", 250];
	{_x setdammage ((getdammage _x) + 0.05)} forEach _array;			// damage ships
	_array = _pos nearObjects ["Motorcycle", 250];
	{_x setdammage ((getdammage _x) + 0.05)} forEach _array;			// damage bikes
	_array = _pos nearObjects ["Car", 250];
	{_x setdammage ((getdammage _x) + 0.05)} forEach _array;			// damage cars
	_array = _pos nearObjects ["Air", 250];
	{_x setdammage ((getdammage _x) + 0.05)} forEach _array;			// damage helis/planes
	_array = _pos nearObjects ["Tank", 250];
	{_x setdammage ((getdammage _x) + 0.05)} forEach _array;			// damage tanks
Link to comment
Share on other sites

  • 0

here i found it 

 

			_unit setSkill [(_x select 0),(_x select 1)]
		} count _aicskill;
		
		ai_ground_units = (ai_ground_units + 1);

		_unit addEventHandler ["Killed",{[_this select 0, _this select 1, "ground"] call on_kill;}];

		if (!isNil "_mission") then {
			_ainum = (wai_mission_data select _mission) select 0;
			wai_mission_data select _mission set [0, (_ainum + 1)];
			_unit setVariable ["missionclean", "ground"];
			_unit setVariable ["mission", _mission, true];
		};

	};

	if (!isNil "_launcher" && wai_use_launchers) then {
		call {
			//if (_launcher == "Random") exitWith { _launcher = (ai_launchers_AT + ai_launchers_AA) call BIS_fnc_selectRandom; };
			if (_launcher == "at") exitWith { _launcher = ai_wep_launchers_AT call BIS_fnc_selectRandom; };
			if (_launcher == "aa") exitWith { _launcher = ai_wep_launchers_AA call BIS_fnc_selectRandom; };
		};
		_rocket = _launcher call find_suitable_ammunition;
		_unit addMagazine _rocket;
		_unit addMagazine _rocket;
		_unit addWeapon _launcher;
	};

Just remove the // so it looks like this

			_unit setSkill [(_x select 0),(_x select 1)]
		} count _aicskill;
		
		ai_ground_units = (ai_ground_units + 1);

		_unit addEventHandler ["Killed",{[_this select 0, _this select 1, "ground"] call on_kill;}];

		if (!isNil "_mission") then {
			_ainum = (wai_mission_data select _mission) select 0;
			wai_mission_data select _mission set [0, (_ainum + 1)];
			_unit setVariable ["missionclean", "ground"];
			_unit setVariable ["mission", _mission, true];
		};

	};

	if (!isNil "_launcher" && wai_use_launchers) then {
		call {
			if (_launcher == "Random") exitWith { _launcher = (ai_launchers_AT + ai_launchers_AA) call BIS_fnc_selectRandom; };
			if (_launcher == "at") exitWith { _launcher = ai_wep_launchers_AT call BIS_fnc_selectRandom; };
			if (_launcher == "aa") exitWith { _launcher = ai_wep_launchers_AA call BIS_fnc_selectRandom; };
		};
		_rocket = _launcher call find_suitable_ammunition;
		_unit addMagazine _rocket;
		_unit addMagazine _rocket;
		_unit addWeapon _launcher;
	};

or you can go into the mission's you and add and put this code in the ai section you can change the bandit to hero if it's a bandit mission

_num = round (random 3) + 4;
	[[_position select 0, _position select 1, 0],_num,"extreme",["random","at"],4,"random","bandit","random",["bandit",150],_mission] call spawn_group;

the "at" or "aa" are the RPG's

 

the "random" is a gun 

 

so it's saying give him a gun aswell as a rpg

["random","at"]
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...