Where to put the logic

Hey there. Using your awesome course (specifically the Tanks section), I made a simple racer. Everything is going fine, but I’ve hit a moment where I can’t decide where to implement a piece of code.

I have a set of checkpoints on the track and would like the AI to use them to navigate the track. I’ve got the navMesh working, the AI is going towards the desired object, that’s all fine.

I can’t figure out where the best place to implement ‘find checkpoints’ function is. Should it be in the AIController?
What if I have race modes where there aren’t checkpoints?
Should I make an AI controller for each mode or should the one AI controller have some gameMode check and decide based on that?

If I have several game modes like time-trial, ‘endless runner’, battle arena or what not, do I implement a game mode for each? Where does the win condition logic go? Game mode or some actor in the scene acting as ‘manager’.

I’m coming from Unity, so I’m not quite sure how to approach this in Unreal. They do differ on how things are done.

Sorry for the lengthy post. Thanks.

Privacy & Terms