Jump to content
Sign in to follow this  
pcc

AI respawning AH6J over and over

Recommended Posts

Can't pin down why AI keeps respawning AH6J_EP1 when there are 2 in a team, over and over but not when its one or with other choppers.

Also, not getting script error either.

_n = _n	+ ["HeliLight"];
_d = _d	+ [GetText (configFile >> "CfgVehicles" >> "AH6J_EP1" >> "displayName")];
_t = _t + [_AIR];
_ab=_ab + [_TEAMTYPENORMAL];
_ai=_ai	+ [false];
_f = _f	+ [Localize "STR_FN_USMC"];
_i = _i	+ [false];
_l = _l	+ [false];
_h = _h	+ [false];
_a = _a	+ [true];
_u	= ["AH6J_EP1"];
_u = _u + ["AH6J_EP1"];
_c = _c	+ [_u];

 

Share this post


Link to post
Share on other sites

If this is in Teams, make it a single heli.  Use Squads to team up two helis, using "HeliLight" in _u array.

 

Can't check WF scripts right now, other comp's in the shop (motherboard gave out   :down: ).  Should be back soon though.

  • Like 1

Share this post


Link to post
Share on other sites

I tried that too and it also respawn loops.  Seems like some unknown conflict with this specific chopper.

Other choppers are fine though,  weird.   The spawn loops happens in both A2 and OA warfare.

Share this post


Link to post
Share on other sites

Really weird, started with clean Config_Teams.sqf and Config_Squads.sqf, and now all OA choppers triggers the respawn loop in A2 warfare.

Single AH6J_EP1 wouldn't even spawn at all.  Wish there was some sort of error message to indicate the cause. 

Share this post


Link to post
Share on other sites

If it was customized, might be something looping in the Server_BuyUnits.sqf.  The config defines various attributes of the units when purchased, but the buy units script is spawning them.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks, I did add || _templateType == Localize "STR_WF_TEAMAIR and it caused the trouble with other OA choppers when it was fine before.

if (_templateType == Localize "STR_WF_TEAMARM" || _templateType == Localize "STR_WF_TEAMAIR) then
{
	_vehicle SetVariable["crew",Crew _vehicle];
	_vehicle AddEventHandler ["GetOut",{_this Spawn BIS_WF_AIVehicleAbandoned}];
};

Tested with default Server_BuyUnit.sqf, unfortunately issue with AH6 persists. :(

I must've messed up somewhere when trying to use default Server_BuyUnit.sqf.  Now it doesn't respawn loop but it always seem to buy one less than listed in Config_Teams.sqf.   Found out that moving the leader into the chopper was causing the conflict in Server_BuyUnit.sqf.

if ((_templateType == Localize "STR_WF_TEAMMECH" || _templateType == Localize "STR_WF_TEAMARM" || _templateType == Localize "STR_WF_TEAMAIR") && _leader == Vehicle _leader) then
	{
		[_leader] AllowGetIn true;
		_leader MoveInDriver _vehicle;
	}

What's the conflict with moving leader into chopper like the other teams?

 

_m = _m        + [2]; in Config_AircraftFactory.sqf seems to also play a part in the spawn issue.  For example: setting it to 1, it will always buy 1 less that listed in Config_Teams.  But no respawn loop. 

Setting it to 2 will trigger respawn loop if more than unit is listed in Config_Teams. 

Share this post


Link to post
Share on other sites

Adding Team Air to those two blocks should be no problem.  There's no conflict I know of.  I have Leader assigned as pilot in attack helos, and cargo in transport helos.

 

Were any changes made that specifically targeted any AH6J_EP1?  Were any changes done in Server AI Team Team_ReinforceAction.sqf or the long update that calls for reinforce at the end of Team_Update.sqf?  Team update is what loops the action.

 

 

  • Like 1

Share this post


Link to post
Share on other sites

I changed crew number of AH6J_EP1 to 1 in Config_AircraftFactory and lowered wait time on all vehicles.  I'm using default corepath for Team_ReinforceAction and Team_update.sqf.

 

If I paire it with another chopper(except MH6J_EP1), it will not spawn loop, if AH6J_EP1 is set to 1 crew in factory.

If the team is a single AH6J_EP1 with 1 crew set in factory, AI won't spawn it at all. 

If team is single AH6J_EP1 with 2 crew set, it won't loop except with move leader into pilot in Server_BuyUnit.

It also spawn loops when AH6J_EP1 is paired with MH6J_EP1 with either 1 or 2 crews set in factory.

 

After moving the planes into Config_AircraftFactory, I've noticed all planes needs to have at least 2 crews set in factory or AI will not buy the last unit listed in Config_Teams, or if single unit, it won't spawn at all.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×