Turn switch on, on level up?

Status
Not open for further replies.

Chefchen

Villager
Member
Joined
Feb 27, 2014
Messages
8
Reaction score
0
First Language
German
Primarily Uses
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 :D

So i could just put it in a Conditional branch.
 

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
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 :D

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.
 
Last edited by a moderator:

Chefchen

Villager
Member
Joined
Feb 27, 2014
Messages
8
Reaction score
0
First Language
German
Primarily Uses
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:/
 

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
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)?
 
Last edited by a moderator:

Chefchen

Villager
Member
Joined
Feb 27, 2014
Messages
8
Reaction score
0
First Language
German
Primarily Uses
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 :/
 
Last edited by a moderator:

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
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)
 

Chefchen

Villager
Member
Joined
Feb 27, 2014
Messages
8
Reaction score
0
First Language
German
Primarily Uses
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 ? :D
 

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
Thank you, that worked! :)

would variables be $game_variables[iD] = true ? :D
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.
 
Last edited by a moderator:

Chefchen

Villager
Member
Joined
Feb 27, 2014
Messages
8
Reaction score
0
First Language
German
Primarily Uses
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 :p

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

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
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
= 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.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top