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!

Share


About the Author

Comments

3 Posts
44 Points

Mesoesa  said 7th September 2017

This is really helpful. Thanks! *1-smile*

Quick Reply

Guest

Enter a username

Security check: What is 8 plus 2?