Domagames

Villager
Member
Joined
Apr 3, 2022
Messages
12
Reaction score
3
First Language
Spanish
Primarily Uses
RMMV
Good afternoon, I am looking for a way to establish the PM of an actor, based on the value of a variable. Under normal circumstances, the value of the variable is added or subtracted, but not the exact value. I need a plugin or code script pls.
 

Ms Littlefish

Time Traveling Victorian Vampire
Global Mod
Joined
Jan 15, 2014
Messages
8,994
Reaction score
14,525
First Language
English
Primarily Uses
RMMV
I have moved this thread from JS Plug-in Releases to JS Plugin Requests.
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,929
Reaction score
11,876
First Language
German
Primarily Uses
RMMV
And what is that PM you want?

If you're talking about MP or similar values, the trick is mathematics: use two commands (one substraction and one addition) to calculate the difference you need to add.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,258
Reaction score
4,734
First Language
EN
Primarily Uses
RMMZ
E.g. "current MP + (50 - current MP)" = 50:

◆Comment:Get difference from target value ◆Control Variables:#0005 Difference = 50 ◆Control Variables:#0005 Difference -= MP of Harold ◆Comment:Gain that much MP ◆Change MP:Harold, + {Difference}
You can get an actor's current MP using Control Variables -> Game Data -> Actor -> MP. In this example the target value was simply 50, but it could easily be something else.
 

Domagames

Villager
Member
Joined
Apr 3, 2022
Messages
12
Reaction score
3
First Language
Spanish
Primarily Uses
RMMV
And what is that PM you want?

If you're talking about MP or similar values, the trick is mathematics: use two commands (one substraction and one addition) to calculate the difference you need to add.
Yes, is the MP. Whats commands should be in this case?
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,929
Reaction score
11,876
First Language
German
Primarily Uses
RMMV
all the command you need is control variable and change MP exactly loike in the example caethyril gave above
 

Domagames

Villager
Member
Joined
Apr 3, 2022
Messages
12
Reaction score
3
First Language
Spanish
Primarily Uses
RMMV
E.g. "current MP + (50 - current MP)" = 50:

◆Comment:Get difference from target value ◆Control Variables:#0005 Difference = 50 ◆Control Variables:#0005 Difference -= MP of Harold ◆Comment:Gain that much MP ◆Change MP:Harold, + {Difference}

You can get an actor's current MP using Control Variables -> Game Data -> Actor -> MP. In this example the target value was simply 50, but it could easily be something else.
Thanks, this was the solution.
 

Latest Threads

Latest Profile Posts

Yknow what? Im seriously considering recruiting a manager to oversee my games development.
Because I cannot focus or complete these tasks by myself. I need someone to give me orders, without having them be my boss.
yp_4vS.png

Remember my latest plugin for rpg maker mz:

Acknowledgement Window is now available!

Take a look here:

Got my focus back, 9/59 maps have the door fix in place now.

Forum statistics

Threads
136,803
Messages
1,270,184
Members
180,558
Latest member
Kev03
Top