Putting players level in a variable

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,923
Reaction score
535
First Language
English
Primarily Uses
N/A
Trying to do a level up event, were the player can semi-fully customize what stats they get (It won't allow the player to do the same stats every level up, and it's going to be semi-dependent on there actions to level up/how they earn EXP) were the player can pick three stats out of the eight on each level up out of a choice of four one to two being semi-random

Only, i need to know how to store players level into a variable, so it can check if the player leveled up. Anyway to do this?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
in events? Control Variables > Game Data > Actor (choose actor) > Level

Of course if you have 5 different actors in your party, they could have 5 different levels.

If you want the leader's level, it'll be Control Variables > Script > $game_party.leader.level
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,923
Reaction score
535
First Language
English
Primarily Uses
N/A
in events? Control Variables > Game Data > Actor (choose actor) > Level

Of course if you have 5 different actors in your party, they could have 5 different levels.

If you want the leader's level, it'll be Control Variables > Script > $game_party.leader.level
Thanks. There's only one actor in this game. I assume i can use the same to put stats into variables for various game events? Thank you Shaz

Edit: Also, the event will use two variables. One to read what the actors level was, and one to read what it is. Five actors would mean 10 variables >~<
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
Five actors would mean 10 variables >~<
Not 10 it would be 6.
1 for each of the 5 Actors, and 1 Placeholder Variable for the current checked player and his level.
since that 1 variable does not need to remember its value for later on, we can just reuse it and overwrite it again and again.

Edit:
Control Variable1 = Actor1 Level
If Variable1 is more than Variable2(Actor1 last safed level)
yes case: Control Variable2 + 1
do your state stuff
no else case
end
Control Variable1 = Actor2 Level
If Variable1 is more than Variable3(Actor2 last safed level)
yes case: Control Variable3 + 1
do your state stuff
no else case
end
 
Last edited:

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
If you feel particularly keen to save variables, you could simply put this in your conditional branch without having to use a temporary variable:
Code:
$game_actors[actor_id_goes_here].level > $game_variables[variable_id_for_current_actor_goes_here]
Of course, you have to change "variable_id_for_current_actor_goes_here" and "actor_id_goes_here" accordingly.
 

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

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,454
Members
137,821
Latest member
Capterson
Top