HP help

ok so in my scene i have 4 targets or bases that are under attack, they only require one hit to destroy them which is fine but i want the game to show the 'game over' screen only when all the bases have been destroyed.
currently i have a global integer named 'Global Base HP' with a value of 4 (1hp per base, complete guess that this would work lol)
then in the 4 'base' actors i have a hitpoints integer set to 1 (1hp) and a Change Attribute set:
game.Global Base HP -TO- self.hitpoints-1
i then created an invisible actor called 'end' and set the rule to:
when game.Global Base HP = 0
Change scene to Game Over
needless to say it doesn't work lol, any ideas on how i might go about this?
thanks
currently i have a global integer named 'Global Base HP' with a value of 4 (1hp per base, complete guess that this would work lol)
then in the 4 'base' actors i have a hitpoints integer set to 1 (1hp) and a Change Attribute set:
game.Global Base HP -TO- self.hitpoints-1
i then created an invisible actor called 'end' and set the rule to:
when game.Global Base HP = 0
Change scene to Game Over
needless to say it doesn't work lol, any ideas on how i might go about this?
thanks
Comments
I don't know what value self.hitpoints is, but it would likely be different for the different bases. If I understood you correctly, this should fix it:
Set game.GlobalBaseHP = game.GlobalBaseHP - 1
if it helps at all the nearest real game i can think of that this is like is missile command from years ago, i just need when all bases r destroyed go to game over, weather its done the way i was trying or not lol