{"action":"opened","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/199","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/199/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/199/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/199/events","html_url":"https://github.com/chrsmith/bwapi/issues/199","id":58482967,"number":199,"title":"Problems with modules OnUnitDestroy and onUnitHide","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-22T00:35:36Z","updated_at":"2015-02-22T00:35:36Z","closed_at":null,"body":"```\n\n\nWhat steps will reproduce the problem?\nKilling a unit (my or enemy's), while OnUnitDestroy and onUnitHide are set\nto print a text message\n\nWhat is the expected output? What do you see instead?\n1. It seems that OnUnitDestroy isn't called, when a unit dies. (no output\non the screen)\n2. onUnitHide works well, when enemy unit hides, but when something dies,\nit outputs \"A Unknown [xxxxxxx] was last seen at 100000,100002\". (xxxxxx is\nrandom string, everything else is the same).\n\nWhat version of the product are you using? On what operating system?\nBWAPI r2108 with BWTA r133 (I got the latest sources and compiled them).  \n\nPlease provide any additional information below.\nI tried with the initial ExampleAiModule (without any improvements), but\nthe same happens. I think, that in BWAPI 2.6.1 (which can be downloaded)\nthis problem doesn't exists.\nHere are the modules (the same happens without \"if (!Broodwar->isReplay())\")\n\nvoid ExampleAIModule::onUnitDestroy(BWAPI::Unit* unit)\n{\n  if (!Broodwar->isReplay())\n    Broodwar->sendText(\"A %s [%x] has been destroyed at\n(%d,%d)\",unit->getType().getName().c_str(),unit,unit->getPosition().x(),unit->ge\ntPosition().y());\n}\n\n\nvoid ExampleAIModule::onUnitHide(BWAPI::Unit* unit)\n{\n  if (!Broodwar->isReplay())\n    Broodwar->sendText(\"A %s [%x] was last seen at\n(%d,%d)\",unit->getType().getName().c_str(),unit,unit->getPosition().x(),unit->ge\ntPosition().y());\n}\n\n```\n\n-----\nOriginal issue reported on code.google.com by `Nuclear...@gmail.com` on 4 Mar 2010 at 10:44"}}