OnUnitIdle not called

API Discussion
I am using the official StarCraft 2 API retrieved here: https://github.com/Blizzard/s2client-api

I am following the tutorial but when I override OnUnitIdle it never gets called.
I have tried creating new units and stopping units from doing anything. Creating a new unit it supposed to call the OnUnitIdle() function, but as when I try it nothing happens. In order to check if it gets called or not I try to print a text to the console window.

" virtual void OnUnitIdle(const Unit* unit) final {
std::cout << "WAT " << std::endl;"

Need help to get this to work!

Join the Conversation

Return to Forum