I’ve been testing my RTSPawn class over the past couple days and I couldn’t get any of my mouse-input event handlers working, they would just never fire. I tried enabling block-all collision on the mesh and capsule, and spent hours reading source files and looking up documentation. I eventually just randomly decided to change the RTSPawn’s AIController from MyRTSAIController to just “none”, just to simplify things, and BAM, all my event handlers started firing right up.
What is it about Controllers that would prevent a Pawn from getting their events? If anyone cares to shed some light on this, the functions I was overloading for OnMouseOver events were…
The delegate I had defined was…
BTW, yes, I had the appropriate bools set to true in my player controller…
bShowMouseCursor = true;
bEnableClickEvents = true;
bEnableMouseOverEvents = true;
It’s obvious that the Pawn isn’t getting any of these events when the MyRTSAIController is possessing it, I just wonder if they were disabled or if they’re going somewhere else, like the MyRTSAIController. If I don’t get an answer I’ll be testing that tomorrow, as I really want to refactor this monolithic RTSPawn into an RTSComponent, RTSAIController and RTSPlayerController. Modularity 4tw.