Level Up Event

Hi guys!
I am trying to make a parallel event when the player level up, it will be show some choices for him to choose.
So whenever the player levels up, this event it will happen.
This event is out of the battle scene, is in the game map.
[EDIT]AND i cannot use any plugins. Only script calls inside the events (because the game it will be for a rtp game jam)

I try severall scripts commands like for example:

Code:
$gamePlayer.LevelUp() 
$gamePlayer.changelevel()
$gameActors.actor(1).changeLevel
$gameActors.actor(1).changeLevel()
$gameActors.actor(1).LevelUp

But none of them worked. Some of them change the level right away, and thats not what i want.

Actually i'am doing something like this with the conditional branch:
Spoiler: IMAGE
kkzXyCn.png


HYDT2hH.png


I believe that this event could also happen if in the conditional branch there was a condition so that whenever that text of "levelUp" appeared, the event would be activated.

Spoiler: IMAGE2
lprJWa1.png

Please help me =/
I'd say the easiest thing would be this kind of code.
This is what you'd plant in an event at the beginning of the game:
Code:
for (var i = 1; i < $gameActors._data.length; i++) $gameActors.actor(i)._previousLevel = $gameActors.actor(i)._level;

Then you'd define this function in a custom plugin or something:
Code:
Game_Actor.prototype.hasLeveledUp = function () {
if (this._previousLevel < this._level) {
this._previousLevel = this._level;
return true;
}
return false;
}

Then you'd just call these functions inside the conditional branch.
Spoiler: image
Screenshot_12.png
I'd say the easiest thing would be ...

Hi! Tyanks for the answer!! I will try this!
I'm not good at programming, but all those "i" that you put into the code, has to be replaced with a ID number?

But i cannot use any custom plugins.
This game is for a rpg maker rtp game jam. I can only use those plugins that come with the package(community basic etc)...
But I can use script calls inside the events!

That code you posted, it is inside of the .js files of rpg maker mv? Or i can say that you create it?
You should have said that first.
That code you posted, it is inside of the .js files of rpg maker mv? Or i can say that you create it?
I created the code. MV has no indicator of level up of some sort. So using the function definition I provided would be illegal even if you were to put it inside a script field, because function definition is not a script call.
However, there's another way.

Spoiler: another way
Screenshot_13.png
@Poryg thank you so much!
It worked! o/

Original thread: https://forums.rpgmakerweb.com/threads/level-up-event.100884/