So, I’m trying to make an AI enemy on a game I’m working on, I’m still kind of new to UE4, but I’ve spent days and hours on researching on how to implement AI behaviour on a car, for example the game is a capture the flag sort of gamer in a arena and there are weapons available to pick up. Thing is I can make a mannequin like patrol chase the player, etc. but I feel like on vehicle is different cause I’ve tried doing the same on what I did on the mannequin but the car will stay still. So far what I have achieved is the car following a nod, a “fixed route”. What I want it to do is, besides picking up the flag and return it to base, I want it to when the AI car picks a weapon up to start and chase the player and try to kill him and when the player picks up a weapon and the AI car doesn’t have one, run away instead. Any ideas on how I can make it work?
Hi, AFAIK for vehicles you need to implement your own path following from scratch. But if you’re already able to let the vehicle follow a path, then you could try the “FindPathToLocationSynchronously” and then let the vehicle follow through the PathPoints you get from that (you might need a second navmesh for your vehicles though, since they are much larger than a mannequin and will therefore need different paths).
Hi, thank you very much for your answer, it really helps. One question though, I still have to use BB and tree right? for the decision making
I still have to use BB and tree right?
for the decision making
You can use those, there’s no difference when using vehicles. You never “have” to use them (same if your AIs would be characters instead of vehicles) but using them will make things easier. With vehicles you just don’t have pathfollowing build in, so the build in MoveTo Task won’t work.
Generally for AI I found those two videos here really helpful
for UE specifically
and about minute 20 to 38 of this https://www.youtube.com/watch?v=Qq_xX1JCreI
And then ofc you have the quickstart (behavior tree and eqs) guides in the UE docs
Thanks a lot for taking the time, really appreciate it!!