Monday, November 22, 2010

Making a Heads or Tails Mini-Game(Rm2k/2k3)



Making a Heads or Tails Mini-Game(Rm2k/2k3)
By: Hawkeye  

     Ok so you want to make a, "Heads or Tails mini-game," this is actually very simple: 

1) First off, get yourself a person who's gonna flip the coin, so make an Event and give it the graphic of some random guy. Make the Event Start Condition: Push Key and set the event to Same Level as Hero

2) Next move into the Event Commands Box and make a message, something like; "Let's play Heads or Tails, pick one." And a brief description of the rules.

3) The next command should be a Show Choice command, make it 3 choices. HEADS, TAILS, LEAVE

4) Under the HEADS choice here's what we're going to do. Make a Variable and name it "Heads", then SET it to 0. Then make a new variable called HEAD/TAILS and set it to RANDOM : 0 to 1. Under that make a Fork condition and have it set that if variable HEAD/TAILS is EQUAL to 0 check the add else case. Under that make a message like, "Good Job! You've won!" and in the else case make a message like, "Aw, sorry you lost. Perhaps next time you'll have better luck." 

5) Now after the end case under that TAILS choice here's what we're going to do. Make a variable and name it "Tails", then SET it to 1. Then take the variable called HEAD/TAILS and set it to RANDOM: 0 to 1. Under that make a Fork condition and have it set that if variable HEAD/TAILS is EQUAL to 1 check the add else case. Under that make a message like, "Good Job! You've won!" and in the else case make a message like,  "Aw, sorry you lost. Perhaps next time you'll have better luck." 

The coding's pretty simple so I wont show it to you but you will in the end be using 3 variables and two forks, remember that. You can add betting and losing/gaining money if you want, but that's more into it and I'm sure you can figure it out for yourself. If you're having any trouble I may add the code later and break it down a bit more.


4 comments:

  1. Oh, I remember making a game like this, except it was with sticks not coins! Good job!

    ReplyDelete
  2. Really cool Tutorial, thanks for helping me with this!

    ReplyDelete
  3. Black Ops 2 Multiplayer tops the itemize when it comes to most enchanting online games. The physiologist aim nigh this gallinacean is the knowledge of the contestant to produce the gamey according to his savour.
    black ops 2 news

    ReplyDelete
  4. Whаt i do not undегѕtοоd is in faсt hοω you are no longeг аctuаllу
    much more smartly-favorеԁ than you maу be right nοw.
    You're very intelligent. You already know thus considerably when it comes to this topic, produced me in my opinion believe it from a lot of numerous angles. Its like men and women don't seem tο be fascіnated
    until іt іs something to accomplish with Lady gaga!
    Үοur οwn ѕtuffs nice.
    Always deаl with it up!

    Feеl free to ѕuгf to my web blog :: house contents Insurance

    ReplyDelete