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.
MV Set PM equal to the value of a variable.
JS Plugin RequestsI have moved this thread from JS Plug-in Releases to JS Plugin Requests.
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.
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.
E.g. "current MP + (50 - current MP)" = 50:
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.
◆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.
Yes, is the MP. Whats commands should be in this case?
all the command you need is control variable and change MP exactly loike in the example caethyril gave above
Thanks, this was the solution.
Original thread: https://forums.rpgmakerweb.com/threads/set-pm-equal-to-the-value-of-a-variable.161365/