Hello, I'm new to this community as it is obvious. I am having an issue with the common event I'm using to check to see if Hero has gained x amount of exp. To get to level 2,3, and so on. My main goal is to setup a custom skill system for my game, and to start I am working on how the character levels. I did not like the standard way it does it. So my solution was to create variables to store values of the hero's exp., level, stats, etc. The first variable [Main Hero XP] stores the amount of exp. he has currently. I then created a common event called Level Check. Set on Parallel Process to constantly check if hero has gained the required exp. In the event I have a conditional branch.
[spoiler]<>Branch if Var [0101:Main Hero XP] is 100 or more
<>Branch if Var [0101:Main Hero XP] is 200 Less
<>Message: Welcome to Level 2
<>
:End
<>
:End[/spoiler]
The issue is that since it is a constant event once I reach 100 exp. It will not stop whatever I put in the conditional branch. Like the message displaying the level. I thought about tricking the system somehow by messing with xp values. However I do not think it would solve the problem. I have tried using switches in combination with Level Check. It repeats because the conditional branch requirements have been met. Though I can't turn it off without losing the ability to constantly check against the exp earned towards a new level. It needs to be able to continue onto a new instance to where it checks to see if hero gained x amount of exp. towards level 3. Any help will be appreciated. Have fun!
Maybe a good idea would be to put a switch in after every level up and then create a condition that if the switch is on the event wont repeat
I talked about something similar in my tutorial right here. (http://rmrk.net/index.php/topic,33961.0.html)
Instead of checking if you're between certain amounts of experience, have the game check to see if you're level 1, level 2, etc. and go from there.
I can elaborate if you need me to, but I think the guide does a good enough job. Maybe.
nice tutorial
lets sum up and see what we have learned today!
The common event should be asking
If hero level = 1 then
If hero XP > or = #Value then
Set hero level to 2
end if
end if
with some creative use of variables you won't have to repeat yourself
If #herolevel = #Nextlevel then
If #heroXP > or = #NextlevelXP then
Add 1 to #herolevel
Add 1 to #Nextlevel
multiply or add #Value to #NextlevelXP
' (you can do both by putting them on separate lines in the order you want them yo happen)
end if
end if
Enjoy! :lol: