Health System Question~Creating Age of War-Like Game for iPod Touch
Hey, I am creating a new itouch game inspired by age of war, and I am wondering if anyone knows a way to have a health System. For example, a swordsman has 20 Health, and deals 50 damage to a giant who has 150 Health. My question is how you can make different damages, so that the amount of hits it takes to kill enemies vary depending on how much attack your guys have, and how much health your enemies have. Thx!
Comments
What you need to do is create a "global" attribute ("GL_Attack" for instance) that constricts it's value to the player's current attack.
Each time the giant records that it's been hit by the player's weapon, it deducts this global value (adjusted any way you want) from the health.
For the monsters attacking the player, however, instead of attaching the player's health attribute to the player actor you could create a global "GL_Player_Health" attribute that controls the players health. This way each enemy could have an individual attack power, and directly adjust the player's health when it records that it has landed a blow to the player.
A better approach would probably be to have a "GL_Player_Damage" attribute instead that monsters can manipulate. That way your player could have buffs that edit that damage before it adjusts the final health.
As you can see you'll have to be pretty inventive to get this working well in GS. I'm not sure this is the best way to approach this as I haven't been using GS that long, but it's a start at least