Hi, I’m just beginning with UE4 and I can’t get a handle of Controllers.
I omitted PlayerController, doing all the logic for my simple game in the one and only Player Pawn, but now I need to create enemies and I don’t really know how it SHOULD be done. My idea was to create an AIController that will set a basic logic for all enemies to follow and create more complex implementations within the AI Pawn classes. So, let’s set an example, the AIController has a Shoot() function that is called every once in a while (based on a time variable inside its possessed Pawn) that does nothing more than call the respective Shoot() function in its possessed Pawn. The problem is that this single AIController will be possessing dozen of different Pawn inherited classes. My questions are:
1.) How do I access the possessed Pawn as it’s actual class rather than just APawn (that is returned by GetControlledPawn()),
2.) Is this the way Controllers and Pawns should be used or should I set the dependencies totally differently?
Also, I want this project to be as “Cplusplussy” as it can get, so please give me a solution that doesn’t depend a lot on Blueprints.