Help make event game over event when player hp 0

Hello everyone can you help to make event game over when hp player is 0 it will trigger game over function ?, i make game with question when player choose wrong answer hp player will decrease -200 nd when hp 0 it will trigger game over function , it.s event need plugin ? Or not ? Can you give some help for my problem ? Thanks
You need to set a variable switch to the player's HP before the questions start. After each answer (and the HP deduction for a wrong answer) have a Conditional branch with that switch = 0
If yes, there is a 'Game Over command on the third tab of the Event Command Menu.
If no, do nothing.

EDIT
I see that you are a new user, going by the number of posts you have asked. This is basic eventing, so I strongly recommend that you work through Andar's compilation of info for new users. Among the things in there, he includes links for a playable tutorial on events and another playable tutorial on switches and variables. Spending a bit of time on this now will save you a huge amount of time and frustration in the future.
I try what i can , and your suggestion but it.s no work or maybe may coding is wrong , can you help fix this , it.s still auto triger game over event hp just decrease 200 , in default hp player hp 450 , here my coding
Try setting the player's HP as a variable. Then check if that variable is equal to 0 or not, if yes, then game over. If no, nothing happens.

*Edit* Oh, I saw the screenshot. Nothing seems wrong. I assume you set the variable at the beginning of the question. What is the HP before the question starts? Is it 450? In that case after a decrease of 200, 250 still remains. It won't be a game over in that case.
Hay hyoryu , i change hp as variable same like you suggestion it.s work hp player -200 nd not auto game over but now i try 3 times input wrong pass it will -600 hp , in default hp is 450 nd after 3 times input -600 it will 0 hp but now game over not trigered after player get 0 hp , i use conditional branch , tab 1 set if variable 0001 = 0 it will game over else do nothing , but not work game over not come even hp player 0
Try setting the player's HP as a variable. Then check if that variable is equal to 0 or not, if yes, then game over. If no, nothing happens.

*Edit* Oh, I saw the screenshot. Nothing seems wrong. I assume you set the variable at the beginning of the question. What is the HP before the question starts? Is it 450? In that case after a decrease of 200, 250 still remains. It won't be a game over in that case.
The problem is that you don't have a control variable command that reads the HP value AFTER it had been changed.

You need to add that command after reducing HP but before the conditional branch.
O_O oh yeah... i can't believe I didn't notice that. *sigh* what a silly mistake from my part.
The problem is that you don't have a control variable command that reads the HP value AFTER it had been changed.

You need to add that command after reducing HP but before the conditional branch.

Hay, i am sorry i didnt get it what i must do , can you give me example like picture it will helpful for me
O_O oh yeah... i can't believe I didn't notice that. *sigh* what a silly mistake from my part.

Can you explain to me what.is wrong i still dont get it 🙁
You have to set the variable after losing HP but before the conditional branch.
You have to set the variable after losing HP but before the conditional branch.

Set like you do before right ? Can you give example ? Pls 🙁 picture maybe
Untitled.png


In my mind set variable just add one more variablr , so it.s reason why my coding not work , very2 big thanks for your help 🙂 🙂 🙂 your are the best , nd thanks for all member to comment my thread , now it.s work

Original thread: https://forums.rpgmakerweb.com/threads/help-make-event-game-over-event-when-player-hp-0.85074/