Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Conditional Branch using levels?

Well, I was just wondering, is there any way to make a conditional branch depending on level? I wanted to add an item that boosts the chosen character's stats, and gives them new usable weapons and such in my game, but the original Conditional Branch doesn't seem to support that, and if it does(and I was conpletely oblivious and didn't notice), can someone explain how?

Thanks in advance  :smile:
 
Stavros":2jj1sitr said:
Well, I was just wondering, is there any way to make a conditional branch depending on level? I wanted to add an item that boosts the chosen character's stats, and gives them new usable weapons and such in my game, but the original Conditional Branch doesn't seem to support that, and if it does(and I was conpletely oblivious and didn't notice), can someone explain how?

Thanks in advance  :smile:

If the conditional branch doesn't suppoirt levels, you could always have it set a variable to the level of the actor you want to check, and then check to see if that variable's value is high enough. Just a thought.
 
Can you explain exactly what it is you are trying to do, and post screenshots of your item, and common events.

I assume you are setting a common event in the item, so when the item is 'used', you check the level, then change stats & add weapons accordingly?
 
That should work as long as Steve is level 25. I don't have VX to test it.

In the "Else" statement, put a text statement to debug....

  Text: -,-, Normal, Bottom
        : Steven is level \V[1]
 
Everything SHOULD work, but the problem is, it makes that incredibly annoying "This item doesn't work" noise when I try to use the item. Even when I put it all into one run on Autorun event, I still have problems
 
alright, test it systematically.

First, set the common event on the item back to 'none'.  See if the item itself works.
You have it set to 'Only from the Menu', and 'One Ally'.
Meaning you can only use it from the menu, and it should prompt you to pick a party member to use it on.

The common event code looks correct to me. Can someone else with VX test it?

Have you patched the Interpreter for the VX script bug?  (see the FAQ)

Be Well
 
Well, for the item, when I removed the common event, it didn't work. I decided to higher the MaxHP parameter by 0, and now it works. Right after, I put the common event back on, and I still have problems. I made an autorun event, setting Steven to level 25(max level), and it says he's level 0
 
Well, I replaced the interpreter, exactly the same way I should have, and now I just plain get an error message:

Script 'Game_Interpreter' line 242: NameError occured.

undefined local variable or method 'command_122' for #<Game_Interpreter:0x15294f8>
 
Well, I didn't completely replace the script, I just replaced the Game_Interpreter area. I might have taken out too much or whatnot, so I might as well see the instructions, maybe I did something wrong.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top