Detecting actor MP value

SolidSilver

Villager
Member
Joined
Jun 29, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
I'm making a sort of "Overheat" mechanic for an actor in my game. Is there any free plugin or script, etc. that I can use to detect when my actor's MP is full? (At 5 MP)

I want to both detect it at the very start of the battle, and when his MP is full (I'm using an MP Regen every turn), so I can confuse him and cause him to "Overheat".

I've been working on this specific thing for days and Its so frustrating. All I need is one thing to make it work, as everything else works with his Mechanic.

I also realize that this is going to be hard to do because I'd like it to only be during battle, if possible.
 

SolidSilver

Villager
Member
Joined
Jun 29, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
I really need this to work, as this mechanic will be a big part of the story, so please tell me whatever you think will help.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
836
Reaction score
466
First Language
Poland
Primarily Uses
RMMV
Conditional branch and use this code:

$gameActors.actor(id).mp = $gameActors.actor(id).mmp

human translation:

if Game Actor with ID current mana (mp) is equal to his Maximum Mana value (mmp)
You can do your stuff.

additional things you can use

hp / mhp - life - maximum life
atk - physical attack
mat - magical attack
def - defense
mdf - magic defense
agi - agility
luk - luck

there are also few more parameters you can use, but I don't feel like it to writting, there are here on forum.
 

SolidSilver

Villager
Member
Joined
Jun 29, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
Thank you! Ive been trying to get this figured out for a while. I'll see if this works
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,504
Reaction score
1,638
First Language
English
Primarily Uses
RMMV
Lol, you don't need a plugin or script. This is basic variable and conditional branch stuff (check a tutorial if you get lost):

If the actor max MP is static, just store actor MP into a variable, then check in a conditional branch if their MP is equal to 5, and if so, run the event.
If the actor Max MP can be raised, store actor Max MP into one variable, then their current MP into another variable. Next, run a conditional branch that checks whether the current MP value matches the max MP value, and if so, run the event.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Having randomized space below my maps is like cheating, every map instantly starts out interesting. See? I just started on this one, and boom interesting!. :LZSexcite:

Moderators, you must have so much patience to be able to deal with everything. I mod in a server of sorts and today we just got a message, which, despite it's helpful constructive criticism, basically stated that all of the mods were jerks and that was the only reason our server was unlikeable. So, thank you, for having patience. You are appreciated! :kaoluv:
Haired slime? Trying some different styles of art. Maybe I can make some resources with this new kind of painting.......
i love my game very much
Uh, I'm probably overthinking this, but I think that some of my music sounds kinda...bad?
The melodies are just sort of awkward, and don't flow.
I'm really not sure what to do. Why am I even worrying about this? I don't even have a battle system yet!

Forum statistics

Threads
105,727
Messages
1,015,935
Members
137,410
Latest member
judicasino88
Top