Jump to content
Sign in to follow this  
Luckyas

Best way to get AI to get in vehicle

Recommended Posts

I am making a mission where I have 2 AI + the player himself in a boat driving towards the shore. When at the shore I need them all to board a hatchback. Whatever I try I can't get this stupid AI to do the right thing. 

 

I've tried the most common option:

unit1 assignAsCargo [car1]; unit1 orderGetIn true; 

Unfortunatly this doesn't work. The AI just keeps sitting in the boat. If I add the orderGetOut command first they DO get out of the boat but then just walk a bit around. When I make one of the AI's group leader, they hop out of the boat, walk around and then order me to get in the boat instead of the car. I also tried it with waypoints but that gave the same results.

 

Does anyone know how I can get this to work? 

At the moment I am so frustrated of the AI that I just want to teleport them in. But that would not look very nice.

Share this post


Link to post
Share on other sites
33 minutes ago, Luckyas said:

unit1 assignAsCargo [car1]; unit1 orderGetIn true; 

Unfortunatly this doesn't work.

 

Well it can't work because wrong input parameters. On both assignAsCargo and orderGetIn.

Always check the wiki if a command works. In your case, check both of them.

 

Cheers

 

Share this post


Link to post
Share on other sites
8 minutes ago, Grumpy Old Man said:

 

Well it can't work because wrong input parameters. On both assignAsCargo and orderGetIn.

Always check the wiki if a command works. In your case, check both of them.

 

Cheers

 

I'm sorry. I typed it wrong here. This is what I am using:

unit1 assignAsCargoIndex [car1, 1];
[unit1] orderGetIn true;

This should work, but it doesn't for me.

Share this post


Link to post
Share on other sites

To move them out of the boat:

unassignvehicle unit1;
[unit1] orderGetIn false;
[unit1] allowGetIn false;

 

To move them into the car once they're out of the boat:

unit1 assignAsCargo car1;
[unit1] orderGetIn true;
[unit1] allowGetIn true;

 

Cheers

Share this post


Link to post
Share on other sites
8 minutes ago, Grumpy Old Man said:

 


unassignvehicle unit1;
[unit1] orderGetIn false;
[unit1] allowGetIn false;

 

This doesn't seem to work. They don't get out of the vehicle. I used doGetOut unit1 and that does work. But then they still don't go into the car.

 

I made a fresh VR scenario and tried to assign the units to a car, and then order them in. Still the same results. However, when I make one of the units the group leader instead of myself they do board the vehicle. But then for some reason the car gets locked for myself. Also I want the player to be group leader and not the AI.

Share this post


Link to post
Share on other sites

Alright I found the problem. I first had to addVehicle to the group.

After that assign the units to the vehicle and order them in.

 

This is working now. Thanks allot tho for trying to help me out! Much appreciated!

  • 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
Sign in to follow this  

×