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.

variables

oaky, so in my game there is an object that has been split into two pieces, and it is the job of my heros to go get those two pieces. They have to fight two different monstersto get each piece, and then they are suppose to bring them together. I have tried to set up the variable so that after collecting both pieces from the monsters, then one hero would say, "okay we have both pieces, now let's go get this thing repaired." But after setting it up, it came out as saying that after only collecting one piece.
This is how I set up the variable. You fight the monster, upon winning you get the half item, then I set the variable to "orb" have specific item in invetory, + 1 to variable "orb", then conditioanal branch, set if variable "orb" has ==2 then say, "okay, we have both pieces, now let's go get this thing repaired." i have even tried to put the conditional branch on a separate page, and still the same thing happenes. What am I doing wrong? And I want to be able to set it so that it doesn't matter who is beaten last, when you get both items, regardless of which monster, the hero will suggest getting a repair job done.
 
Actually, this one's pretty simple.

If I'm following your description correctly, the event:

1: Drops an Orb, either through Change Inventory, or as a battle drop;

2: Sets a variable equal to the number of Orbs in your inventory;

3: Increases that variable by 1, and

4: Checks to see if the variable is 2.

Step 1 gives you 1 orb. Step 2 sets the variable "Orb" to a value of 1. Step 3 then raises it to 2.

Basically, you don't need step 3. Setting the variable equal to the number of orbs is all that you need.
 

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