Jump to content
xripx

AI squad won't listen to GET IN waypoint

Recommended Posts

Hi all,

 

I'm in a squad, not as leader. I have a GET IN waypoint for my squad on an empty vehicle. This waypoint is activated by a trigger.

 

Sure enough, the trigger does its job. The squad leader issues the "GET IN" command. So I get in. Then....

 

 

Then 1 of the AI squaddies gets in, then another, then the first gets out, then another gets in, then 2 get out, then 1 gets in etc etc etc, shuffling like that. The squad leader is constantly yelling for certain members to GET IN, then yells for others to DISMOUNT for some reason. I'm just sitting there in driver's seat watching this. It's incredibly frustrating that the AI can't follow simplest command sometimes. 

 

I've tried different settings on the GET IN waypoint, like setting behavior to careless or safe or combat, force hold fire. I've tried all combinations of that that I can think of. Combat seems to be to the most effective.

 

Any ideas how I can just get these guys to just go straight to the damn car and get in?

Share this post


Link to post
Share on other sites

Out of plain curiosity have you tried getting in the car after everybody else has?

Maybe you get in a seat that is meant for another AI member and the game gets confused. 

Share this post


Link to post
Share on other sites

@xripx,
You can paste this into the init properties dialog and forget about the "GET IN" waypoint. When you board the vehicle the group will follow, when you exit so will they. This script will only fire once. If you want to make it repeatable, we'll just rewrite a little bit.
 

Spoiler

loadGroup=
[]spawn{	_grp=group player;
	waitUntil {sleep 1; !isNull objectParent player};
		{_x setbehaviour "CARELESS";
		_x assignAsCargo vehicle player;
		_x moveinCargo (vehicle player);
		} foreach units _grp;
	waitUntil {sleep 1; isNull objectParent player};
		{_x setBehaviour "AWARE";
		moveOut _x;
		unassignvehicle _x;
		} foreach units _grp;
};

 

have fun!

  • Like 2

Share this post


Link to post
Share on other sites
On 10/17/2019 at 6:25 AM, wogz187 said:

@xripx,
You can paste this into the init properties dialog and forget about the "GET IN" waypoint. When you board the vehicle the group will follow, when you exit so will they. This script will only fire once. If you want to make it repeatable, we'll just rewrite a little bit.
 

  Hide contents


loadGroup=
[]spawn{	_grp=group player;
	waitUntil {sleep 1; !isNull objectParent player};
		{_x setbehaviour "CARELESS";
		_x assignAsCargo vehicle player;
		_x moveinCargo (vehicle player);
		} foreach units _grp;
	waitUntil {sleep 1; isNull objectParent player};
		{_x setBehaviour "AWARE";
		moveOut _x;
		unassignvehicle _x;
		} foreach units _grp;
};

 

have fun!

 

Hmm, @wogz187

 

I put this in the mission init. The mission normally starts with me and the squad in a vehicle. With your code in the mission init, it immediately starts with everyone booted from the vehicle. Should I put this in a different init?

Share this post


Link to post
Share on other sites
On 10/17/2019 at 5:32 AM, JohnKalo said:

Out of plain curiosity have you tried getting in the car after everybody else has?

Maybe you get in a seat that is meant for another AI member and the game gets confused. 

I did, they start the whole "get in, dismount" song and dance with or without me involved.

Share this post


Link to post
Share on other sites

@xripx,

Quote

The mission normally starts with me and the squad in a vehicle. With your code in the mission init, it immediately starts with everyone booted from the vehicle...


I'm not sure what to tell you. I'm not able to reproduce that problem. It works for me whether it's in the init or not and whether player starts in vehicle or not.

Don't give them waypoints until they reach the mission location and deploy from the vehicle.

Share this post


Link to post
Share on other sites
13 minutes ago, wogz187 said:

@xripx,


I'm not sure what to tell you. I'm not able to  reproduce that problem. It works for me whether it's in the init or not and whether player starts in vehicle or not.

Don't give them waypoints until they reach the mission location and deploy from the vehicle.

Well I can offer a clue as  to why they're behaving strangely. When we got to the GET IN waypoint, a few seconds later, there was an "area clear" because the enemy was eliminated for the moment. Then everyone got in, no issues. So it appears they're "torn" between engaging the enemy and getting in the car. I guess that's why the squad leader keeps yelling "GET IN" and "DISMOUNT" over and over? How can I make them totally ignore the enemy? 

Share this post


Link to post
Share on other sites

@xripx,

Quote

How can I make them totally ignore the enemy? 

We already did that here,

_x setbehaviour "CARELESS";

In the case of mounted units they should still return fire if able. Try with no editor waypoints.

 

Have fun!
 

Share this post


Link to post
Share on other sites
5 minutes ago, wogz187 said:

@xripx,

We already did that here,


_x setbehaviour "CARELESS";

In the case of mounted units they should still return fire if able. Try with no editor waypoints.

 

Have fun!
 

 

Ha, I'd love to, but I'm no where near an advanced enough user to set it up without waypoints. There are several waypoints and events before this GET IN waypoint that I'd have no idea how to setup and would essentially start from scratch.

Share this post


Link to post
Share on other sites

@xripx,

Quote

I'd have no idea how to setup and would essentially start from scratch.

Starting from scratch sounds like a great way to learn how to setup.

 

I think you could use a little MMF_fnc in your mission. But not quite yet because it still isn't ready...

Share this post


Link to post
Share on other sites

I think I have put a bandaid on this by putting in the mission init DISABLEAI "TARGET" for my squad leader and same for "AUTOTARGET" which might not have accomplished anything, but I figure he'll maybe stop wanting to attack. Then I changed the GET IN waypoint to Careless and Force Hold fire. I didn't want to do that because I didn't want the radio chatter to reflect it, but I just put enableRadio false in the mission init. I also had to move the car a bit because it was close to a couple of structures which seemed not to jive with the squad AI. This seems to work somewhat consistently.

  • Like 2

Share this post


Link to post
Share on other sites

In order not to disable the radio in all of the mission you can use: 

enableSentences false; 

for the time needed and then re-enable it. Via triggers alone it is maybe not too hard to implement it.

  • Like 1

Share this post


Link to post
Share on other sites

Try
Get in nearest
or
Assign as cargo index 

Make sure you're not running any mod or script that augments the ai's behavior, like Vcom, and if you are, make sure that you disable the mod or script on the team leader. There is a few ways to get around this with some minor scripting. One thing you should know is the ai tends to bug out when it has command over players in some situations, vehicles is certainly one of them, but simply assigning them to a role in the vehicle will help in most cases, if not, try assigning them to cargo index.. Arma is just one of those things that sometimes you'll spend a lot of time trying to get minor things to work as intended.

GL 

 

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

×