Blizzard / s2client-api

StarCraft II Client - C++ library supported on Windows, Linux and Mac designed for building scripted bots and research using the SC2API.
MIT License
1.66k stars 282 forks source link

ClientEvent callbacks do not work #324

Closed minchopaskal closed 4 years ago

minchopaskal commented 4 years ago

Each bot i try to run, even an empty one doesn't seem to call the ClientEvent callbacks. It's weird since Observer()->getMinerals() for example, returns the right amount of minerals, but getUnits(Unit::Alliance::Self) always returns 0. If I make a unt(for example a drone) idle the OnUnitIdle isn't called. Is the library still supported or am I missing something crucial?

alkurbatov commented 4 years ago

Hi, @minchopaskal the library is broken in many places at this moment. To fix the callbacks you need to merge #306 Another option is to use this fork: https://github.com/alkurbatov/cpp-sc2

minchopaskal commented 4 years ago

Thank you! Would you say your fork would be sufficient for a school project, since I'm not chasing an AI capable of competing?

alkurbatov commented 4 years ago

The fork is very similar to this API (mostly bug fixes and a couple of features). So it might be what you need.