So, I’m creating a rough outline of an AI. What I’m currently trying to accomplish is trying to access a function in a script “Movement” from a script “AI_Controller”. The problem is AI_Controller is derived from Movement( which will handle movments like avoiding collisions, moving around friendlies, etc). I tried making a forward declaration of the class AI_Controller and casting using that, but I got obscure errors which I can make no sense of. I understand I can’t just include AI_Controller.h as that would create a circular dependency.
Without going into to much detail, I want to access a return function that gives me an type specified in an enum, which I will use to compare overlapping actors and the actor calling the movement function.
If anything I’ll just use tags, but I’d prefer not to.
Here is the function in Movement where I want to cast to the derived class in order to access it’s function.