Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnUnitDestroyed Event not reliably issued #46

Open
mboedigh opened this issue Dec 21, 2019 · 2 comments
Open

OnUnitDestroyed Event not reliably issued #46

mboedigh opened this issue Dec 21, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@mboedigh
Copy link
Contributor

Most units that die cause sc2_api to issue an OnUnitDestroyed event, but I noticed that some of my own units hadn't been seen for many game frames. This should not happen for friendly units since they are always visible to yourself. I kept track when the event was issued and found it was not always called. I've only seen it happen after a large battle.
This bug must lie in a protocol problem or maybe sc2 itself, is not identifying all dead units.

@alkurbatov alkurbatov added the bug Something isn't working label May 16, 2020
@ImpulseCloud
Copy link

"some of my own units hadn't been seen for many game frames. This should not happen for friendly units since they are always visible to yourself."

last_seen is not updated when workers are inside a Vespene refinery/etc or when passengers in Bunker/Medivac/Dropperlord.

So, if you were just checking for a non-current last_seen with alive=true, this is not necessarily a bug. (for above examples)

@mboedigh Have you had any issues with this in the last year, or do you think the above explanation could be what you were seeing?

@mboedigh
Copy link
Contributor Author

I think it is real and ongoing. In my discussion, I was talking about combat units not workers. I understand that enemy units might die out of sight, and that could, in theory, explain why I didn't get an OnUnitDestroyed event. In this case, it was my own units, and so that was not an explanation. I don't think it is directly fixable without Blizzard's help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants