Jump to content
kagenekosama

AI wont get in vehicle

Recommended Posts

So i'm trying to make a function to get AI to get in passenger in players vehicle, however ai is not getting inside vehicle if the player is the commander of the vehicle(only works when player is driver ), AI only gets in position go get in but doesn't actually load  inside, is there any way to fix this?

 

c9993Ob.jpg

 

Extra details, AI only gets in vehicle when player is commander if the engine if off.

I'm not using any mod
 

The script i'm using

  { 
  	 _x assignAsCargo (vehicle player); 
  } forEach units _group; 
  (units _group) orderGetIn true; 

thanks for the help 

 

 

 

 

 

Share this post


Link to post
Share on other sites

@kagenekosama,

Try something like,

{ _x assignAsCargo (vehicle player); _x moveinCargo (vehicle player); } forEach units _group;

I think that will work. No animation.
Not tested.

Share this post


Link to post
Share on other sites

How are you getting _group?

The following works for me regardless of where I am in the vehicle:

_group = vehCargoGroup;	//	Named the group in the editor.
_veh = objectParent player;

{ 
	_x assignAsCargo _veh;
} forEach units _group;

(units _group) orderGetIn true;

 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Maff said:

How are you getting _group?

The following works for me regardless of where I am in the vehicle:


_group = vehCargoGroup;	//	Named the group in the editor.
_veh = objectParent player;

{ 
	_x assignAsCargo _veh;
} forEach units _group;

(units _group) orderGetIn true;

 

I'm getting group pretty much same as you do, and i tried objectParent while trying to get it to work, same effect seems like it is bug, they only get in once i get as vehicle driver.

Share this post


Link to post
Share on other sites

I am stumped.

All of the methods posted work for me in vanilla.

 


Maybe there is something else going wrong.


I have a few hours to spare...

Can you post your entire function?

Share this post


Link to post
Share on other sites

Have you tried creating a blank mission (in virtual map) and just the vehicle and the team and see if that works? To check if it's not something in your mission, like terrain, unit behavior, other units, other scripts, that cause this behaviour.

 

Possibly a allowGetIn false command somewhere plays a role?

  • Like 1

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

×