There is a type of event That I want to create that checks the player's level and essentially Increases the price of the Inn
How to make an event to check player level?
RPG Maker MZ SupportI have moved this thread from RPG Maker MZ Software Updates to RPG Maker MZ Support.
By player's level, do you mean the level of the main character (i.e. a specific actor?) If so, this is readily available in events:
control variables ->gamedata-> actor -> level
control variables ->gamedata-> actor -> level
Like @werzaque, Step 1 is to store the value in a variable.
Step 2 is to use a Conditional Branch to check the variable value and adjust the price of the Inn. For example below, if Hero Level is 5 or less, then DO THIS, Else (see create else branch check) DO THAT.
Here is a full mockup:
Step 2 is to use a Conditional Branch to check the variable value and adjust the price of the Inn. For example below, if Hero Level is 5 or less, then DO THIS, Else (see create else branch check) DO THAT.
Here is a full mockup:
You could also use the script option in the control variables event command to dynamically set the value of the inn price to avoid having multiple if statements.
Note the top line:
$gameActors.actor(1).level * 25 sets the variable referenced to the value of Actor 1's level * 25.
Then, you could use the variable in the script option in the conditional check the party's gold against the variable
The full line in the script field is:
Lastly, you can use the variable option in the change gold command to subtract the matching value from the party's gold.
Note the top line:
$gameActors.actor(1).level * 25 sets the variable referenced to the value of Actor 1's level * 25.
Then, you could use the variable in the script option in the conditional check the party's gold against the variable
The full line in the script field is:
$gameParty.gold() >= $gameVariables.value(662)
Lastly, you can use the variable option in the change gold command to subtract the matching value from the party's gold.
Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-an-event-to-check-player-level.160042/
