Jump to content
BlacKnightBK

How to get AI to drive on roads

Recommended Posts

Hello guys,

I created a mission where 3 tempests, a marid, and a Tigris spawn in the main airport and there and are filled with AIs. I gave them an attack mission on Kavala. Now they all spawn normally and the units get moved into their vehicles. However, the drivers are idiots. I set their status to safe but they don't avoid the objects in their way. and they try to drive in a straight line towards the road into all the trees and obstacles. 

 

WHAT DO I DO :O

 

Share this post


Link to post
Share on other sites

Hi

have you tried setting them to "CARELESS" with setBehaviour? (or from waypoint settings)

 

_group setBehaviour "CARELESS";

 

Share this post


Link to post
Share on other sites
12 minutes ago, gc8 said:

Hi

have you tried setting them to "CARELESS" with setBehaviour? (or from waypoint settings)

 


_group setBehaviour "CARELESS";

 

 

nop, I set them to safe

Share this post


Link to post
Share on other sites
57 minutes ago, BlacKnightBK said:

nop, I set them to safe

 

well according to this they should move on roads... can you double check that the waypoints really are SAFE/CARELESS and is there any combat waypoint?

 

Share this post


Link to post
Share on other sites
2 minutes ago, gc8 said:

 

well according to this they should move on roads... can you double check that the waypoints really are SAFE/CARELESS and is there any combat waypoint?

 

 

I tasked them to attack Kavala

Share this post


Link to post
Share on other sites
19 minutes ago, gc8 said:

oh I read something interesting from the wiki: https://community.bistudio.com/wiki/2D_Editor:_Waypoints#Behaviour

 

"Safe - Similar to Careless, except the group will change behaviour to Aware upon detecting an enemy unit."

 

 

so try CARELESS instead of SAFE.

 

 

That would not work, i will change their tasking to move instead of attack

Share this post


Link to post
Share on other sites

this has been an issue with AI since forever. try vcomai driving mod. its older but may still work. they are AI so good luck.

Share this post


Link to post
Share on other sites

Set them to Careless till they get a certain distance from Kavala. use something like waitUntil {_unit distance Kavala < 300}; then set them to combat. You'll either need to place an object down and give it Kavala name in the variable name section.

Share this post


Link to post
Share on other sites
this forceFollowRoad true;

in vehicle init line. put vehicle exactly on the road and also set vehicle direction to the pathway at the beginning. 

Share this post


Link to post
Share on other sites
1 minute ago, Persian MO said:

this forceFollowRoad true;

in vehicle init line. put vehicle exactly on the road and also set vehicle direction to the pathway at the beginning. 

 

Oh thanks for reminding me, when i was double checking my code i found that i forgot to set them to safe. They drive on road now one behind the other. Still like idiots but better than before

 

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

×