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 281 forks source link

Never see CARRYHARVESTABLEVESPENEGEYSERGAS #241

Closed ghost closed 6 years ago

ghost commented 6 years ago

I'm trying to figure out how many SCVs are carrying Vespene by watching their buffs. Unfortunately they are always 271 (CARRYMINERALFIELDMINERALS). Can someone help me out?

k-macmillan commented 6 years ago

Fun fact: when a unit emerges from a gas collector it triggers OnUnitCreated (keeps the same tag, just triggers the event). You can check the buffs then. The buff is 275. I can see it with Zerg just fine, not sure about the other races.

ghost commented 6 years ago

Ok, my mistake. If you look at buffs.end() there ist the current buff wich contains the CARRYHARVESTABLEVESPENEGEYSERGAS Flag...