So what I need here is more else if statements.
So first I'll be checking the value of two variables and if any of them does not match it will check the value of two other variables.
Did that make sense? Prolly not but the idea is I want to have more than 2 conditions. like 10 but I have no idea on how to do that.
Now I just looked this up and found out this is about how the code should work to check if one statement is true.
To clarify what I'm doing right now is. Might fighter Exp will go up by +5 Exp each time I use specific skills. Once that value reaches 100 or more it will check if my fighter level is still lvl 1. if yes it will increase to level 2.
No in the event that the fighter level is already lvl 2 and needs to go up to lvl 3 I can do in the Else branch but what if I want a to advance to lvl 4 and 5 and so on. Keep in mind that this check will have to run each time I use a "Fighter skill" and the other Common events will have to do something similar too.
Feels like a lot of unecessary work(I fear that it might lag more than it needs too) if I created several lone if statements which would cause the program to look though the other 9 or so if statements this event has even though say the third one already was true and there was no need to look further.
So to the main question is is there a way to use "else if" statements? If not are there other alternatives?
Edit: Also I don't know javascript so if someone could comfirm if the check I posted was correct and will do the thing I want or if I have something way wrong and off target 😛
So first I'll be checking the value of two variables and if any of them does not match it will check the value of two other variables.
Did that make sense? Prolly not but the idea is I want to have more than 2 conditions. like 10 but I have no idea on how to do that.
Now I just looked this up and found out this is about how the code should work to check if one statement is true.
To clarify what I'm doing right now is. Might fighter Exp will go up by +5 Exp each time I use specific skills. Once that value reaches 100 or more it will check if my fighter level is still lvl 1. if yes it will increase to level 2.
No in the event that the fighter level is already lvl 2 and needs to go up to lvl 3 I can do in the Else branch but what if I want a to advance to lvl 4 and 5 and so on. Keep in mind that this check will have to run each time I use a "Fighter skill" and the other Common events will have to do something similar too.
Feels like a lot of unecessary work(I fear that it might lag more than it needs too) if I created several lone if statements which would cause the program to look though the other 9 or so if statements this event has even though say the third one already was true and there was no need to look further.
So to the main question is is there a way to use "else if" statements? If not are there other alternatives?
Edit: Also I don't know javascript so if someone could comfirm if the check I posted was correct and will do the thing I want or if I have something way wrong and off target 😛