DraGoons Simple Heads or Tails Game.

Written by: Andrew Bertino (DraGoon)

If you have any questions feel free to email me at dragoon3763@hotmail.com

If you get a chance go to my old crappy site at www.angelfire.com/fl4/DraGoonsWebPage/index.html

The Demo game is located at http://www.homestead.com/_ksi0701961587305358/noven/files/capture_game_demo.zip

 

Notes: You should at least know switches and some variables to figure this out.

What is this about: This teaches you how to make a heads or tails game if you ever need it in your game.

Why did I make this: I was bored one day flipping a coin and though itd be cool if Id make a heads or tails game in rm2k and I did.

 

Ok here we go making the Heads!

 

Step1 - First off make a person or some sort of even you can talk to.

Step2 Then inside the event conditions start off with a message like Im going to flip a coin youre going to guess heads or tails

Step3 Then make a Show Choice with two choices one saying heads the other saying tails.

Step4 Now right under the heads case select Change Variables and make a variable called Heads and set it to 0.

Step5 Then right after that make another variable called Heads or Tails and then where it says operand select the Random button and have the left row set at 0 and the right row set at 1.

Step6 Now make a fork option with ELSE case on. Then select variable and choose the Heads or Tails variable and set it to 0.

Step7 Now right under the fork condition put a message saying something like you are right it was heads. Then under the ELSE case also put a message but this time saying something like Sorry it was tails.

 

Ok here we go making the Tails!

 

Step1 Right after the end case in the Heads section and under the Tails case make a new variable called Tails and set it to 1.

Step2 Then do the same thing like you did in the heads insert a change variable and use Heads or Tails and again do the random 0 to 1.

Step3 Now do another fork condition and make sure ELSE case is on. Then do the same thing you did above; select the Heads or Tails variable and this time set it to 1.

Step4 - Then right under the Fork condition insert a message saying something like good job it was tails.

Step5 Then under the Else case put another message saying something like Sorry it was heads.

 

Thats it youre all done!

 

Congratulations if you figured this out you have just made a Heads or Tails game. If you got lost and have no clue what to do take a look at the full code below and maybe you can see where you messed up. ~ = Not part of the code.

 

<>Messg: Hey Im going to flip a coin then you are going to guess heads or tails ok? Here we go!

<>Show Choice: Heads/Tails

:[Heads] Case

<>Variable Ch:[001:Heads] Set, 0 ~The 001: may vary~

<>Variable Ch:[003:Heads or Tails] Set, Randm [0*1] ~ The 003: may vary~

<>Fork OPTN:Varbl[003:Heads or Tails] -0

<>Messg: Good job it was heads!

<>

:ELSE Case

<>Messg: Sorry it was tails.

<>

:END Case

<>

:[Tails] Case

<>Variable Ch:[002:Tails] Set, 1 ~The 002: may vary~

<>Variable Ch:[003:Heads or Tails] Set, Randm [0*1] ~ The 003: may vary~

<>Fork OPTN:Varbl[003:Heads or Tails] -1

<>Messg: Good job it was tails!

<>

:ELSE Case

<>Messg: Sorry it was heads.

<>

:END Case

<>

:END Case

<>

 

I hope this helped you in any way shape or form and that it was somewhat easy to understand. If you have any questions feel free to email me from the address above. If you do use this in your game you dont have to add my name to the credits unless you want to.

Сайт управляется системой uCoz