Character Leveling up as a condition for common event

Eschaton

Hack Fraud
Veteran
Joined
Mar 4, 2013
Messages
2,029
Reaction score
532
First Language
English
Primarily Uses
N/A
Now, I know how to use "Character is at x level" as a condition, but what I'd like to do is have a character passing the EXP threshold and reaching the next level as the condition itself for a common event.

Is this possible and how?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
I experimented a while ago with something similiar, and it is possible with minor script alterations and a few limitations. To get rid of those limitations completely would probably require a full script, not what I did.

I made a parallel process common event triggered on a switch, and then went to the level-up-part of the engine and included that switch there. As a result the common event was executed after the battle in which the actors leveled up was left.

However, there are some limitations to this:

The common event on parallel will be called once, no matter who or how many actors leveled up. However, you can add variables to the level up functions to store who and how many levels were really gained in the battle.

You have to switch off the common event after all processing to prevent it from being called again.

The common event will be after battle processing, it's not possible (without more scripts) to apply parallel processes during battle screen.
 

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
Now, I know how to use "Character is at x level" as a condition, but what I'd like to do is have a character passing the EXP threshold and reaching the next level as the condition itself for a common event.

Is this possible and how?
I'm not sure exactly what you mean here.  So if this post misses the mark just ignore it.

But maybe what you can do is create a variable that keeps track of your character's experience points and use that as a condition rather the actual level.  For example - and let's say it takes 12 experience points to reach level 2.

Control Variables: [Actor1's EXP] = Game Data/[Eric's] EXP

Conditional Branch: [Actor1's Exp] >= 12
 
Last edited by a moderator:

Liak

Veteran
Veteran
Joined
Mar 13, 2012
Messages
1,788
Reaction score
270
First Language
German
Primarily Uses
Instead of relying on scripts, you could also get a little creative here. If you have sprite encounters, you can simply have a "After Battle" common event that checks for the condition and put it after every battle in the game (sounds like much work, but it also gives you the chance to do all sorts of things after battles in general). If you don't have that, you can have a Switch set to ON after each battle (via enemy troop event) and that switch triggers the "After Battle" common event that checks if your actor has a certain level.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I wouldn't base it on EXP, since the curves are variable and it would be a LOT of work to list the EXP required for every character, for every level.


If you WANTED to do it using variables, you would save the actor's level into a variable, then have a script that compares the actor's current level with what's in that variable. If they're different, the actor has leveled up (and you'd need to reset that variable with the new level). However, that would require a variable per actor, and a parallel process common event that's continually running and checking on every frame, when you're really only going to level up after a fairly decent period of time, which is a huge waste.


If I needed to run something on the map every time someone levelled up, I would use a similar method to Andar's.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top