Variable For Player MP?

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,813
Reaction score
3,227
First Language
English
Primarily Uses
RMVXA
So, I've been working on an event battle system, which, for the most part is working smoothly, however, I am trying to make it possible to use magic. I want to use a conditional branch with a variable to check if the player can use magic, but I don't know how to assign MP to a variable for the player. I know how to assign an Actor's MP to a variable, but my game has a system to switch characters in game, and I was looking for a way to avoid assigning a variable to every individual actor in the party. Thank you in advance.
 

Wavelength

Edge of Eternity
Global Mod
Joined
Jul 22, 2014
Messages
4,991
Reaction score
4,178
First Language
English
Primarily Uses
RMVXA
If I understand you correctly, you want to assign the variable based on which actor is currently the first member of the party rather than assigning based on a specific actor?


The script line $game_variables[25] = $game_party.members[0].mp will assign the party leader's (that is, the current first member of the party) to Variable #25, for example.  members[1] would be the second member of the party instead.  You would use this in a "Script..." event command.  You could also just use the "Control Variables" event command and use the script option, typing in only the following: $game_party.members[0].mp
 
Last edited by a moderator:

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,813
Reaction score
3,227
First Language
English
Primarily Uses
RMVXA
I thought it would be something like that! Thank you so much!  :) This thread can be closed. 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,167
Reaction score
12,445
First Language
English
Primarily Uses
RMMV
You could also use Control Variables and put $game_party.leader.mp into the Script box.  Does the same thing.
 

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
1,813
Reaction score
3,227
First Language
English
Primarily Uses
RMVXA
That's pretty much what I did because I know the script call for variables so I figured it'd do the same thing anyway.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

If you had some musical requests in line with me.. feel free to re post! Corona has killed me and have recently got my internet back <3
I'm now working on procedural generated World Maps for my own project.
Is there anyone who's interested in having this Plugin for his own game?
I have a dream where RMer are not blinded and too dependant on published script / plugins...
RM MV ACE? 2020? Super? Legends? Sword and Shield? 2.5D? RM Pixel? RM 2: Revenge of Squared RTP tiles? Don't mind me, I'm just wondering about what will be the name of the next engine.


So I came up with a new look for the paths, and along the way realized health bars are so overrated, so now a crazy red light trail follows her and gets shorter as her life decreases. :LZSexcite:

Forum statistics

Threads
98,211
Messages
950,359
Members
129,507
Latest member
ghost01zx
Top