I’m trying to call the function inside the Tick method, but i dont know how to reference to the function, i tried to use AIControllerClass, that should contain the reference to the class containing the function to be called, but without any success.
Any help?
Thanks in advance
Yeah, it’s better to read few books about C++ before trying to make something with it.
AIControllerClass is UClass in this case, which is obviously not ABot1Controller.
You should declare pointer to ABot1Controller in your AAIBot1, and either initialize it inside AAIBot1 or set to an initialized one, before calling function.
I also believe that’s not how controllers/pawns work, pawn should have reference to its controller. I didn’t deal with controllers/pawns yet actually, just basic stuff, so can’t tell how it’s done. First you tell your pawn that it’s controlled by specified controller, then when you want to call function of your custom controller, you have to do something like that(inside your AAIBot1)