*Solved*
In the process of working this out, I realized it did not need to be a script. So this is in the wrong part of the forum. Sorry Mods!
So first I put a Variable in a blank event that runs parallel, and named it Temporary Level(pic1). Then activated a Self Switch. Next there is a Parallel Common Event that keeps tabs on another Variable named Player Level. Within the events that give the Player EXP(pic2) or take the Player's EXP, it calls another common event(not parallel or autorun). This one checks IF the Player Level > Temporary Level, update Temp level to be set to player level, increase another Variable named Level Tracker by 1 and end the event. It also has another conditional branch that says IF Player Level < Temporary Level, Change player level +1(pic 3). Finally every time you use the SKILL Level UP, it checks if Level Tracker is > 0 , runs the code for level up(in my case the custom stat increases) and removes 1 from Level Tracker.
Original Post:
Hey guys I'm back again.
I'm trying to create a EXP penalty for dying. It's easy enough honestly, but if the player loses to much Exp they go down a Level.
How would I go about setting up a script to prevent the player from Deleveling?
Why this is important, after every 4 levels in game you gain a stat point. This stat point is used to permanently increase a "SKILL" that greatly improves users Stats. Also upon every Level up you can choose 1 stat to get a small boost. If the players find out about the deleveling situation it could have people spamming death as a way to increase stats, and would break the balance of the game.
I have Level UP and Skill UP tied to the "skills" in the database. So upon every level the player learns these, and when they use them they forget them. I also have a Variable that increases by 1 for every level. and everytime one of those skills are used it decreases the variable by 1. and if its 0 then it wont allow the player to use the skill again.
In the process of working this out, I realized it did not need to be a script. So this is in the wrong part of the forum. Sorry Mods!
So first I put a Variable in a blank event that runs parallel, and named it Temporary Level(pic1). Then activated a Self Switch. Next there is a Parallel Common Event that keeps tabs on another Variable named Player Level. Within the events that give the Player EXP(pic2) or take the Player's EXP, it calls another common event(not parallel or autorun). This one checks IF the Player Level > Temporary Level, update Temp level to be set to player level, increase another Variable named Level Tracker by 1 and end the event. It also has another conditional branch that says IF Player Level < Temporary Level, Change player level +1(pic 3). Finally every time you use the SKILL Level UP, it checks if Level Tracker is > 0 , runs the code for level up(in my case the custom stat increases) and removes 1 from Level Tracker.
Original Post:
Hey guys I'm back again.
I'm trying to create a EXP penalty for dying. It's easy enough honestly, but if the player loses to much Exp they go down a Level.
How would I go about setting up a script to prevent the player from Deleveling?
Why this is important, after every 4 levels in game you gain a stat point. This stat point is used to permanently increase a "SKILL" that greatly improves users Stats. Also upon every Level up you can choose 1 stat to get a small boost. If the players find out about the deleveling situation it could have people spamming death as a way to increase stats, and would break the balance of the game.
I have Level UP and Skill UP tied to the "skills" in the database. So upon every level the player learns these, and when they use them they forget them. I also have a Variable that increases by 1 for every level. and everytime one of those skills are used it decreases the variable by 1. and if its 0 then it wont allow the player to use the skill again.