Hey! I'm looking to implement some simple part breaking feature in my game, where I have overlayed sprites of body parts on the main boss and they act as distinct entities of their own with hp and stats that the player can target separately from the boss.
Specifically I want the parts to be connected to the boss HP so when you choose to attack a part it drains HP from the boss total hp. I'm not sure how to go about implementing this however. And I'd appreciate some ideas.
My own incomplete theory: I create a variable that is connected to the boss MAX HP lets say Var1 and then a second that is connected to the monster part Max HP Var2. then id create another variable which is Monster part Current HP Var3 and subtract that from Var2 in order to find the dmg done? and then subtract that from var1? and set this calculation as a every turn on turn end of the battle in the troop events? This way seems good only problem is that in the 2nd step where I subtract Var 3 from var 2 that won't show how much dmg i did this turn but the amount of dmg the monster part has received in total.
Is there some variable that has access to the amount of dmg that is dealt in the most recent player attack?
For reference I have only 1 actor and it will stay that way.
Thanks in advance.
Specifically I want the parts to be connected to the boss HP so when you choose to attack a part it drains HP from the boss total hp. I'm not sure how to go about implementing this however. And I'd appreciate some ideas.
My own incomplete theory: I create a variable that is connected to the boss MAX HP lets say Var1 and then a second that is connected to the monster part Max HP Var2. then id create another variable which is Monster part Current HP Var3 and subtract that from Var2 in order to find the dmg done? and then subtract that from var1? and set this calculation as a every turn on turn end of the battle in the troop events? This way seems good only problem is that in the 2nd step where I subtract Var 3 from var 2 that won't show how much dmg i did this turn but the amount of dmg the monster part has received in total.
Is there some variable that has access to the amount of dmg that is dealt in the most recent player attack?
For reference I have only 1 actor and it will stay that way.
Thanks in advance.