{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/184","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/184/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/184/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/184/events","html_url":"https://github.com/chrsmith/bwapi/issues/184","id":58674416,"number":184,"title":"Detection of attacked units.","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/chrsmith/bwapi/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Priority-Low","name":"Priority-Low","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Type-Enhancement","name":"Type-Enhancement","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-24T00:31:15Z","updated_at":"2015-02-24T00:31:17Z","closed_at":"2015-02-24T00:31:15Z","body":"```\nWhat steps will reproduce the problem?\n1. Move to an enemy without attacking them.\n2. Use BWAPI to detect the attack on your units.\n\nWhat is the expected output? What do you see instead?\nI can attack units, but I can't know when I am attacked.\nWell, I could parse all the units visible (Fog of War is enabled) and test \nfor isStartingAttack. So I would know the enemy is attacking and I which \nposition. But I can't know which unit is attacked. I could know by \ncomparing between frames hitpoint of my units but there got to be another \nway. Also, in case there is a siege tank on that shoot at me out of my \nrange of Fog, i might not get isStartingAttack flag so I couldn't know I am \nunder attack. Unless again I watch hitpoint which i would find stupid.\n\nI saw in the API something about AttackType but it doesn't seems in use \nyet.\n\nWhat version of the product are you using? On what operating system?\n2.6.1 on Vista.\n\nThanks.\n\n```\n\n-----\nOriginal issue reported on code.google.com by `patrick....@gmail.com` on 14 Jan 2010 at 5:54"},"comment":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/comments/75672909","html_url":"https://github.com/chrsmith/bwapi/issues/184#issuecomment-75672909","issue_url":"https://api.github.com/repos/chrsmith/bwapi/issues/184","id":75672909,"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-02-24T00:31:16Z","updated_at":"2015-02-24T00:31:16Z","body":"```\nI had the same problems, then stumbled into the bullet array in broodwar memory \nwhen \ntrying to find a way to detect psionic storms. Bullet support will be THE means \nto \ndetect who has been attacking your units. It's even more, just like a human \nplayer \ncan predict when the antiair missile of his goliath will hit the target he \ndesignated, that will be possible with AIs too.\n\nIt won't be helpful with mines, since those are units, not bullets. And like \nwith \nanything belonging to the enemy, you do not get to see it's orders or targets. \nYou \nhave to deduce enemies intentions from his actions.\n\nI will have the bullet support (or a stripped version at least) in the BWAPI1 \ninterface ready for the BWAPIv3.0 release. Can't promise anything for BWAPI2 \ntho.\n\n```\n\n-----\nOriginal comment by `goo...@teabix.com` on 14 Jan 2010 at 10:15"}}