How to make common event trigger depending on MP?

SHORT QUESTION:
Is it possible to make a common event occur when the actor's MP reaches 100%?

LONG QUESTION:
To get into more detail, I want to make the character die/trigger game over when their MP reaches 100% (As strange as that may sound.) I'm actually not planning on using MP in battle at all, I was going to give it a completely different purpose. I made a gauge that's in the corner of the screen at all times that basically shows how close the player is to insanity. If the gauge is full, I want it to trigger the game over screen. The values the gauge is showing is actually the MP, since I'm not going to use it. So I guess what I'm really asking is can I make the player die when their MP gets maxed out?

I apologize if this is difficult to follow and thank you in advance 🙂
How is it not going to happen as soon as the game starts? Part of initializing an actor is setting their HP and MP to their maximum values.

Similarly, if you use any Restore command to heal actors, it will make their MP full again.

Might it not make more sense to base it off of TP, which starts at 0, then you can control how it increases?

Regardless, the answer is "sure." Just make a common event that does whatever you want to happen when MP is full. Whenever you do something that can cause MP to increase, call that event immediately afterward to check it.

It should also be trivial to change your gauge to be based on a game variable instead of the actor's MP.
How is it not going to happen as soon as the game starts?
I was thinking of just setting an auto run event on the first map that sets the player's MP to 0, and then turning on a switch that enables the new common event I make.
Might it not make more sense to base it off of TP, which starts at 0, then you can control how it increases?
I was initially going to use TP, but I don't want it to go up when the player gets hit or deals damage. I only want it to go up when I event it.
Just make a common event that does whatever you want to happen when MP is full.
This is the part that I was confused about. There's no option in the conditional branch that has anything to do with MP. Is there another way of doing this that I'm unaware of? Or is there another way to event "If actor 1's MP is 100%, trigger game over screen"? If I'm missing something obvious I apologize, I'm very new to this.
You can set a variable to the players MP and then use the variable in the conditional branch.
You can set a variable to the players MP and then use the variable in the conditional branch.
Thank you! This worked perfectly 🙂
I was initially going to use TP, but I don't want it to go up when the player gets hit or deals damage. I only want it to go up when I event it.
There are existing plugins that modify how TP works - I think it's easier to do that than to avoid restoring MP, but I suppose that depends on your game.

This is the part that I was confused about. There's no option in the conditional branch that has anything to do with MP. Is there another way of doing this that I'm unaware of?
My whole point was that there's no reason to actually use MP (or any other parameter) - you can simply and entirely use a variable.

The only reason to connect this to MP at all is if, in addition to the gauge you're drawing on the main screen, you also want to still see it in the MP gauge in the menu/battle.

I'm glad you got it working the way you want.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-common-event-trigger-depending-on-mp.170089/