This extremely basic tutorial will show you how to make a conditional branch check a characters level. This only requires one, short line of code.
The Basics
The first thing you want to do is make a conditional branch, then go to the fourth page, tick the "Script" option, the last option.
Now, if you're not familiar with scripting like I am, don't worry. This is extremely simple! However, it does have a bit of complexity to it. Check the next step for more information.
The slightly complex part of it all.
In the "Script" box, copy and paste this line:
$game_actors[ACTOR].level == LEVEL
In the place of "ACTOR" put the ID number of your Actor. [Example: if you want the first actor in the database to be checked, put "1" in the place of "ACTOR".]
Before we go into how to set the level, the "==" in the quote checks if the level is EQUAL to the set level. if you want other conditions, look here:
"==" if you want it be equal to the level.
">" if you want it to be higher.
"<" if you want it to be lower.
">=" if you want it to be higher or equal.
"<=" if you want it to be lower or equal.
In the place of "LEVEL" put the number of the level you want it to check for. [Example: If you want it to check if you're level is exactly, or higher than level 10.]
So the end result of the examples would be
$game_actors[1].level >= 10
And that's really it! I hoped this tutorial helped!
I've been a fan of RPGs, especially Dragon Quest, for many years. I live in New York, and I've been working in RPG Maker XP for almost four years, as of 2016. I'm highly passionate about designing my game(hopefully one day, i can add an s), and commit to it strongly.
3 Posts
44 Points
This is really helpful. Thanks!