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.

How can you make an event tell you that you can't buy something?

um, how do you make an event tell you that you can not buy something if you do not have enough money?
I don't mean with "Shop Procesing" but with an event like this.


Ticket Man:
Hello dear, would you like a ticket?

(Show Choices)
Yes (10 gold coins)

No



So, I would really like it if anyone could tell me, how to make it so that if you click on yes, and you don't have enough coins, it won't let you buy it.
I've heard about something like "Money Check" But I have looked, and never found anything called that.
If someone could help, I would very greatfull.

Thanks in advance :wink:
 
Conditional branch, one of the best events.

Insert this right after the player chooses Yes. Go to page one, first of the second batch: Conditional Branch. Then, in Conditional Branch, go to the fourth page and click on the box that says Gold. Then choose greater than or less than that amount. In your case, it's greater than. So, your event page should look similar to this:

@> Show Text: Ticket Man:
                      Hello dear, would you like a ticket?
@> Show Choices: Yes., No.,
  @> If Yes:
  @> Conditional Branch: Gold Greater than 10    <---Checks if the player has enough money.
    @> Show Text: Ticket Man:
                          Here is your ticket!
    @> Change Gold: -10
    @> Change Items: Ticket +1

  @>Else:    <--- If the player doesn't have 10 gold.
    @> Show Text: Ticket Man:
                          Sorry, dear, but you don't have enough money.
  @> Branch End    <--- The end of the Conditional Branch.
  @>

I hope I helped you! And do explore some more around Conditional Branch. It will help you, trust me  :wink:.

Oh yes, out of curiosity, how old are you? Don't take this too personally, please  :tongue:.

Happy game making,
~speedolphins

Edit:
Aww, Demodronik beat me to it. Well, I still hope you benefited from me, also. Good luck on your game!
 
Dreamland":3sdvfio6 said:
Thanks!

edit:
By the way, I'm 11

You're very welcome! Remember, Conditional Branch is seriously one of the most important event commands.

You're 11?! Well, glad to see another young one on these forums, too. I turned 11 not too long ago.
 
speedolphins":11y0kf9d said:
Dreamland":11y0kf9d said:
Thanks!

edit:
By the way, I'm 11

You're very welcome! Remember, Conditional Branch is seriously one of the most important event commands.

You're 11?! Well, glad to see another young one on these forums, too. I turned 11 not too long ago.
You're kidding right?

And yeah you can do almost anything with Conditional Branches.  You have to know how to use them correctly if you want to make a good game.
 
Actingman00":lrjoh4vt said:
speedolphins":lrjoh4vt said:
Dreamland":lrjoh4vt said:
Thanks!

edit:
By the way, I'm 11

You're very welcome! Remember, Conditional Branch is seriously one of the most important event commands.

You're 11?! Well, glad to see another young one on these forums, too. I turned 11 not too long ago.
You're kidding right?

And yeah you can do almost anything with Conditional Branches.  You have to know how to use them correctly if you want to make a good game.
Uh, why would I joke about my age...?
 

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