{"action":"created","issue":{"url":"https://api.github.com/repos/OrMisicL/FCNPC/issues/1","labels_url":"https://api.github.com/repos/OrMisicL/FCNPC/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/OrMisicL/FCNPC/issues/1/comments","events_url":"https://api.github.com/repos/OrMisicL/FCNPC/issues/1/events","html_url":"https://github.com/OrMisicL/FCNPC/pull/1","id":34057806,"number":1,"title":"Replace health/armour limits.","user":{"login":"zeelorenc","id":4084891,"avatar_url":"https://avatars.githubusercontent.com/u/4084891?v=3","gravatar_id":"","url":"https://api.github.com/users/zeelorenc","html_url":"https://github.com/zeelorenc","followers_url":"https://api.github.com/users/zeelorenc/followers","following_url":"https://api.github.com/users/zeelorenc/following{/other_user}","gists_url":"https://api.github.com/users/zeelorenc/gists{/gist_id}","starred_url":"https://api.github.com/users/zeelorenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeelorenc/subscriptions","organizations_url":"https://api.github.com/users/zeelorenc/orgs","repos_url":"https://api.github.com/users/zeelorenc/repos","events_url":"https://api.github.com/users/zeelorenc/events{/privacy}","received_events_url":"https://api.github.com/users/zeelorenc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-05-22T07:34:19Z","updated_at":"2015-05-22T06:40:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OrMisicL/FCNPC/pulls/1","html_url":"https://github.com/OrMisicL/FCNPC/pull/1","diff_url":"https://github.com/OrMisicL/FCNPC/pull/1.diff","patch_url":"https://github.com/OrMisicL/FCNPC/pull/1.patch"},"body":"Sometimes we want the NPC to have more health/armour as they die too quickly."},"comment":{"url":"https://api.github.com/repos/OrMisicL/FCNPC/issues/comments/104538019","html_url":"https://github.com/OrMisicL/FCNPC/pull/1#issuecomment-104538019","issue_url":"https://api.github.com/repos/OrMisicL/FCNPC/issues/1","id":104538019,"user":{"login":"prineside","id":2880623,"avatar_url":"https://avatars.githubusercontent.com/u/2880623?v=3","gravatar_id":"","url":"https://api.github.com/users/prineside","html_url":"https://github.com/prineside","followers_url":"https://api.github.com/users/prineside/followers","following_url":"https://api.github.com/users/prineside/following{/other_user}","gists_url":"https://api.github.com/users/prineside/gists{/gist_id}","starred_url":"https://api.github.com/users/prineside/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prineside/subscriptions","organizations_url":"https://api.github.com/users/prineside/orgs","repos_url":"https://api.github.com/users/prineside/repos","events_url":"https://api.github.com/users/prineside/events{/privacy}","received_events_url":"https://api.github.com/users/prineside/received_events","type":"User","site_admin":false},"created_at":"2015-05-22T06:40:24Z","updated_at":"2015-05-22T06:40:24Z","body":"You can set lots of health for any NPC without changes in plugin:\r\n1. Create an array for NPC health:\r\nenum e_NPC_Health {\r\n  Float:CURRENT,\r\n  FLoat:MAXIMUM\r\n}\r\nnew NPC_Health[ e_NPC_Health ];\r\n\r\n2. When creating new NPC, set it's health:\r\nnew npcid = ...\r\nNPC_Health[ npcid ][ MAXIMUM ] = 1000.0;\r\nNPC_Health[ npcid ][ CURRENT ] = 1000.0;\r\n\r\n3. In FCNPC_OnTakeDamage (or in any callback where you handle NPC damage):\r\nNPC_Health[ npcid ][ CURRENT ] -= damageAmount;\r\nIf ( NPC_Health[ npcid ][ CURRENT ] <= 0.0 ) {\r\n// NPC was killed, do what you do in that case\r\n} else {\r\nFCNPC_SetHealth( npcid, NPC_Health[ npcid ][ CURRENT ] / NPC_Health[ npcid ][ MAXIMUM ] * 100.0 );\r\n}"}}