Jump to content
dragonflyfan

AI Move to vehicle position on trigger

Recommended Posts

Hi all,

 

I'm hoping for a little help getting an AI to move into a specific helicopter position on activation of a trigger.

 

I can do this quite easily in the Editor using waypoints and triggers, however the AI get into any available placement in the vehicle which is not quite what I want.

 

I found this script (this MoveInCargo [helo2, 1];)  and placed it into the init field of the AI and it works great,  the AI get into the exact seat that I want. However this happens when the game first starts and the AI is already waiting for me when I arrive at the vehicle.

 

What I am wanting is for that script to activate on a trigger, which is what I have done in the Editor however it does not seem to be working. See screenshot #1 below.

 

I changed the script to ([gunner2] MoveInCargo [helo2, 1] ) however that gives me an error, see screenshot #2

 

Any chance someone can tell me what I am doing wrong please?

 

Thanks, JAs

 

2.png

 

3.png

 

 

 

Share this post


Link to post
Share on other sites

Hi guys,

 

The 'movein' command works a treat thanks, I have the AI moving into custom positions which is great. 

 

Can I use a 'getin' command so that I can see them climb in at all, the 'movein' command just makes them  magically appear in the position.

 

I've looked up 'getin' and 'getinorder' however none of them seem to work for me.

 

Any help would be much appreciated.

 

Thanks

Share this post


Link to post
Share on other sites

Try AssignAsCargoIndex on unit before giving them the 'getin' command, and I think they will play the animation, and move into desired position in vehicle.

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

×