Hey guys, I'm trying to create a game over for when the character's HP is 0, but I've tried several ways. I've seen it on forums, I've used GPT, and still haven't been able to make a game over work. Besides, the HP never reaches 0; it always stays at 1.
The idea was that when the player touches a monster, its life is taken away; if he touches it several times, he will die. Can someone help me, please?
Rather than using HP, you could use a variable.
Set the variable to whatever number you want the player's health to be, then make it so each time the monster touches the player, the variable decreases by 1. Put a condition in there so that after inflicting damage, it checks the variable's current value isn't 0. If it is 0, it sends the player to the game over screen.
The only way to keep alive or revive the hero in XP would be to set a state that keeps that guy alive or revives him by setting his HP to 1 or above. This might also mean that something could be removing the death state (the first state) at some point...
Would setting a hero's HP to 0 be enough to kill him?
The answer is yes, it would kill that guy. The corresponding method already adds the Knockout (Death) state by default.
The Change HP command actually checks for all of the party members to be dead before triggering the gameover flag. If this is not happening, then check the Allow Knockout in Battle option EVEN if the player is still on the map.
Now the question is what's the maximum size of your party? Just 1? Or 2+ heroes?
If it's always gonna be 1, then it should have worked from the very beginning. If that's not the case and you still need to kill the lead character and call the gameover screen, you'd need to alter Interpreter's command_311 aka Change HP event command.