Turn switch on, on level up?

I need to know how i can activate a switch on level up.

Does someone got an idea? Is there an easy Script?

Something like $game_actors[1].notifyonlevelup 😀

So i could just put it in a Conditional branch.
I need to know how i can activate a switch on level up.

Does someone got an idea? Is there an easy Script?

Something like $game_actors[1].notifyonlevelup 😀

So i could just put it in a Conditional branch.

I'm pretty sure you can make a common event, with a condition branch that X char is Y lv.

Just double checked, yea you can, but you first need to turn it into a variable first, then once that's set, you make that variable the condition, for the condition branch.
I'm p[retty sure you can make a common event, with a condition branch that X char is Y lv.
Yeah but, i cant get a notify on level up.

I could just check the value of a variable, but i need that for every level, which means i could do this 100 times...

Having a little script that turns a switch on is a lot easier, because i want to make a skillpoint kinda system...

I could also do it in 5 level steps but thats not how i want it to be:/
Yeah but, i cant get a notify on level up.

I could just check the value of a variable, but i need that for every level, which means i could do this 100 times...

Having a little script that turns a switch on is a lot easier, because i want to make a skillpoint kinda system...

I could also do it in 5 level steps but thats not how i want it to be:/
What, are you trying to tell me, every time you gain a new lv, you're gonna want anothor switch to be turned on: If that's the case, please tell me why you need to constantly turn on a switch after every lv(because the odds are there's a easier/more efficient way to do what you want, without turning a new switch on after every up lv)?
Actually i want a switch to be turned on, to activate a common event which turns the switch off afterwards, so it can get switched on again.

Basically i want a skillpoint system based on weapon types (one handed, two handed, etc) so while there is a level up, you gain a skill point

and after a battle a common event checks the weapon type of the currently equipped weapon, and adds 1 point to a variable, which is the exp of this weapontypelevel

and if the level of the weapontype is high enough, you can use a skillpoint on it, to gain a skill or slightly increase your stats, while using a weapon with that weapon type.

EDIT:

Sorry badly explained... Im really tired, which is probably the reason why i cant write a single sentence without a single misspelling...

SORRY!

EDIT2:
I will probably try to explain it better tomorrow, after i've slept a bit :/
Actually i want a switch to be turned on, to activate a common event which turns the switch off afterwards, so it can get switched on again.

Basically i want a skillpoint system based on weapon types (one handed, two handed, etc) so while there is a level up, you gain a skill point

and after a battle a common event checks the weapon type of the currently equipped weapon, and adds 1 point to a variable, which is the exp of this weapontypelevel

and if the level of the weapontype is high enough, you can use a skillpoint on it, to gain a skill or slightly increase your stats, while using a weapon with that weapon type.

EDIT:

Sorry badly explained... Im really tired, which is probably the reason why i cant write a single sentence without a single misspelling...

SORRY!

Oh ok, I think that can be done, it may be a bit tricky though.

I think this may work(unless I'm misunderstanding how this aspect of variables functions), first set a varariable to record the char lev, then make a variable using the lv variable you just created, and put add, constant 1, then create your common event/condition branch, and use the variable lv +1 variable as a condition.
yes, it is possible - even easy with scripts.


I did that once, but I don't remember exactly and I didn't save it because it was so easy to do...


You have to finde the function in the original scripts where the actors gain their levels, then add a command like


$game_switches[iD] = true


into that function.


That's all


(You'll have to replace the ID with the number of the switch, and I don't know if the array name is correct - but it's just inserting one line per switch into that function.


(I tried it with a variable counting up, but that had s problem when different actors gained several levels - but that was due to what I wanted to be triggered by that variable)


Just make a common event parallel process conditioned on that switch, and the CE will run after the battlescreen has endet (no parallel process runs during battlescreen)
yes, it is possible - even easy with scripts.

I did that once, but I don't remember exactly and I didn't save it because it was so easy to do...

You have to finde the function in the original scripts where the actors gain their levels, then add a command like

$game_switches[iD] = true

into that function.

That's all

(You'll have to replace the ID with the number of the switch, and I don't know if the array name is correct - but it's just inserting one line per switch into that function.

(I tried it with a variable counting up, but that had s problem when different actors gained several levels - but that was due to what I wanted to be triggered by that variable)

Just make a common event parallel process conditioned on that switch, and the CE will run after the battlescreen has endet (no parallel process runs during battlescreen)
Thank you, that worked! 🙂

would variables be $game_variables[iD] = true ? 😀
Thank you, that worked! 🙂

would variables be $game_variables[iD] = true ? 😀
I see you got it working with the script, and serioulsy It's just as simple in event form, so by all means, you might as well just stick with the script, I just want to post my finding after running some tests(it works perfectly).

This is how it would be set up in event form, make every troop set a variable for the Actor's current lv, this way(as well as turn on a switch, since you're gonna use a common event to check your lv after battle. Note: Every trooop should have the exact same command string, no need to make it more complicated then it needs to be, all you're doing is resetting the current lv variable every battle, that's it).

 Make a autorun common event with the switch you turned on in battle. Then make a condition branch using the lv variable with the add constant 1 option Boom, done.

Note: don't forget to turn off the switch after the end of the common event or the game will freeze.

PS. I'm so gonna need to use this system(I'm not gonna tie it to weapons, but I'm probally gonna have some kind of bonus system)now 🙂 I love topics like this, I wouldn't have thought of doing something like this, if I didn't start looking into it, inorder to help someone.
I see you got it working with the script, and serioulsy It's just as simple in event form, so by all means, you might as well just stick with the script, I just want to post my finding after running some tests(it works perfectly).

This is how it would be set up in event form, make every troop set a variable for the Actor's current lv, this way(as well as turn on a switch, since you're gonna use a common event to check your lv after battle. Note: Every trooop should have the exact same command string, no need to make it more complicated then it needs to be, all you're doing is resetting the current lv variable every battle, that's it).

 Make a autorun common event with the switch you turned on in battle. Then make a condition branch using the lv variable with the add constant 1 option Boom, done.

Note: don't forget to turn off the switch after the end of the common event or the game will freeze.

PS. I'm so gonna need to use this system(I'm not gonna tie it to weapons, but I'm probally gonna have some kind of bonus system)now 🙂 I love topics like this, I wouldn't have thought of doing something like this, if I didn't start looking into it, inorder to help someone.
Np, i love to inspire people 😛

btw, my commen event thingy is basically done. k, actually its not in the project yet but i exactly know how to do it! 😀

Im currently trying to create a little window, where players could spend their skillpoints, after leveling up.

The window is already popping up but isnt doing much xD
= true would be SETTING the switch to true.


== true is CHECKING to see if the switch is true.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/turn-switch-on-on-level-up.24349/