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 to make a betting system

How to Make a Betting System

Okeydokey, I am going to tell you how to make a betting system. If you don't know what betting is, you must have an IQ of -1. Betting is where you give up money (or something else) and put it on a certain thing.
You bet $5 on a horse called "Lucky Ducky" and he wins the race, you will recieve double the money because you gambled correctly.
Now that that's out of the way, onto the tutorial.

Requires:
The ability to understand Variables
The ability to understand Events

NOTE: I'M USING THIS FOR A MONSTER ARENA SYSTEM SO DON'T MIND ME IF I SAY SOMETHING ABOUT MONSTERS
Step 1
We must make an event with a graphic. Why do we need a graphic? Because this requires talking and our character would look stupid if he/she was talking to nothing. You can have any graphic you want.

Step 2
Make sure our event has trigger on "Action Button" but this is default so we don't really need to do that.

Step 3
Make 3 Variables called: Bet, Luck and Gold

Step 4
Make the following commands:
Text: Welcoming and asking if they would like to bet
Choice: Yes or No
Text: Ask which monster (or something else)
Choices: 1: Something 2: Something 3: Something 4: Something or "more" if you have more bets
When 1: Control Variables: Luck = Random (1~50)
Control Variables: Gold = Gold in Inventory

Text: Asking how much money to bet and possibly how much money is needed
Input Number: 8 Digits for Variable: Bet
Conditional Branch: Variable Bet > Gold
Text: Saying the player doesn't have enough money
End Branch
Gold: - Variable: Gold
Text: Saying it's started
Conditional Branch: Variable >= 35
Control Variables: Bet x2
Gold: + Variable: Bet
Play SE
Text: Saying Congratz and giving money
ELSE
Text: Saying they didn't win

You then copy all this for all of the choices and at the end:
(From Choices: Yes and No) When No:
Text: Saying something


Hope you liked the tutorial.
 
Gold:  You'd have to set the input number to a variable.  (however much you bet.)  Then you'd check "gold >=  the amount you bet."  If it isn't the same or greater, then show some text and don't allow the bet to take place. 

That might have been way too simple and if it didn't make sense because I just started in the middle of nowhere, I'll try it again, lol.
Anyway:  This is an awesome system. I've never thought of anything like this before.  Nice job.
 

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