{"action":"created","issue":{"url":"https://api.github.com/repos/jasonhall/bwapi/issues/90","labels_url":"https://api.github.com/repos/jasonhall/bwapi/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/jasonhall/bwapi/issues/90/comments","events_url":"https://api.github.com/repos/jasonhall/bwapi/issues/90/events","html_url":"https://github.com/jasonhall/bwapi/issues/90","id":59426813,"number":90,"title":"onAddUnit","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":[{"url":"https://api.github.com/repos/jasonhall/bwapi/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/jasonhall/bwapi/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-02T00:50:20Z","updated_at":"2015-03-02T00:50:21Z","closed_at":"2015-03-02T00:50:20Z","body":"```\nFrom clckwrk in the forum:\n\n\"I've been poking around the BWAPI and trying to set up some basic actions\nwhen it occured to me (after an hour of confusion) that the AIModule\nfunction \"onAddUnit\" is never called or simply doesn't work for some reason.\n\nSlight correction -- the call does work! It just doesn't work for me. I got\nit working for my player once, but nine out of ten times, the function is\ncalled when my OPPONENT makes new units.\"\n```\n\nOriginal issue reported on code.google.com by `lowerlo...@gmail.com` on 14 Nov 2009 at 10:13"},"comment":{"url":"https://api.github.com/repos/jasonhall/bwapi/issues/comments/76642369","html_url":"https://github.com/jasonhall/bwapi/issues/90#issuecomment-76642369","issue_url":"https://api.github.com/repos/jasonhall/bwapi/issues/90","id":76642369,"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},"created_at":"2015-03-02T00:50:21Z","updated_at":"2015-03-02T00:50:21Z","body":"```\nYeah, that is the desired behavior - all units that are visible upon creation \nshould\ncall onAddUnit. Similarly all visible units that get destroyed should call \nonRemoveUnit.\n```\n\nOriginal comment by `lowerlo...@gmail.com` on 15 Nov 2009 at 6:28"}}