Jump to content
Sign in to follow this  
TrenchClub

AI keeps driving into a wall, how do I stop this?

Recommended Posts

The AI keeps driving into the same wall pretty much no matter what I place in the way.

How do I discourage this without placing additional waypoints?

http://i.imgur.com/3f1FoGg.jpg (150 kB)

The red arrows show the direction of travel

Circled are the wall sections the vehicles will run over every time, without fail, no matter what is placed in their path.

Alternatively, how do I insert additional waypoints for the convoy in this script?

http://pastebin.com/0nugKkap

Share this post


Link to post
Share on other sites

Seems a game problem, I searched the forums and AI still has some problems driving vehicles in corners.

Share this post


Link to post
Share on other sites

Which vehicle are you using? I've noticed the Ifrits are much worse.

Share this post


Link to post
Share on other sites

If you must have them drive that particular corner, then you could put a trigger just before it that detects the vehicle presence. You want to place this trigger before the corner when the vehicle's direction is still correct (i.e., pointing enough to left so they clear the corner). In the trigger, call a function with a loop that keeps setting dir to the vehicle's current dir, so they can't cut the corner. Adjust the loop iterations (and sleep), so the loop lasts long enough for them to swing wide. When loop stops, they will hopefully resume driving correctly and miss the crash. Good luck.

If he AI slows to resist the dir override, you can also get their current velocity when you get current dir, and keep setting that velocity in the same loop when setting dir.

Edited by JohnnyBoy

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  

×