Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Level up character

Status
Not open for further replies.

Eliaquim

Villager
Hi guys!
I'am new in rpg maker mv and i try 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.
I try severall scripts commands like:

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:



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.

 

CT_Bolt

Global Moderator
Staff member
Resource Team
Xy$
0.02
Hi guys!
I'am new in rpg maker mv and i try 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.
I try severall scripts commands like:

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:



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.

You could use this plugin:
http://himeworks.com/2015/10/level-up-events/

Much more of a simple setup.(cool)
 

CT_Bolt

Global Moderator
Staff member
Resource Team
Xy$
0.02
Hi! Thanks for the answer!
But i'm sorry, i forgot to mention that i cannot any custom plugins.
Because this game is for a rtp game jam. Without any plugins or edits :/
I can use only script calls inside the events.
Ohhhh I see.
In that case check out what I've found out...

Method (A)
upload_2018-10-9_9-12-6.png
Using a parallel event you can add or alias functions (wink)
I use a parallel event in the very beginning (first map) of the game then either turn on a self switch and setup a blank page 2 or use erase event if I know I'm not coming back to the map ever.

JavaScript:
var commonEventId = 1;
var GameActor_levelUp = Game_Actor.prototype.levelUp;
Game_Actor.prototype.levelUp = function() {
  GameActor_levelUp.call(this);
  $gameTemp.reserveCommonEvent(commonEventId);
};
upload_2018-10-9_9-21-14.png
What I've done is inside the parallel event I placed an alias of the function that "levels up" the player.
Added a part to it to call a common event whenever the player levels up.
Should work in all parts of the game (battle, map, etc).

This will also help cut down drastically on your parallel event processing power. (can really drain memory).
Due to having parallel event constantly checking for a "level up".

This event isn't placed on every map (cute) Only the first map.

This is how to check for a level up manually if you really really want to...
Method (B)
This must be placed on every map the player could level up on
(...or a parallel common event using a switch to turn the event on.)
upload_2018-10-9_9-37-34.png

Also aside from not needing to be on every map, Method (A) also works for battles but will run the common event when it returns to the map.

Let me know how it goes.


Very cool your going enter the Game Jam! (cool)(thumbsup)
Good luck to ya! (cute)
 
Last edited:

Eliaquim

Villager
Hey!
I'm not sure if i can use the first method, but it worked!

Also, the second method work too!

Thank you so much Ct_Bolt! o/
 
Status
Not open for further replies.
Top