This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-09-23 03:53:26

lil_mellybelly
Scratcher
Registered: 2007-07-03
Posts: 3

horse betting

im doing a horse racing game where u make a bet and u click on a number from  1-5 for a horse..it then goes to a racing stage withe 5 horse sprites racing. how do i make it that if that i  pick a number and that number horse wins the money goes i have goes up

Offline

 

#2 2007-09-24 14:36:21

kiteflyer
Scratcher
Registered: 2007-07-30
Posts: 16

Re: horse betting

Hiya, this is actually pretty simple. All you need is one variable,called 'horse' , five horses, and a finish line. First, make it so when green clicked, set 'horse' to zero, and move horses to start position. Then make it so each number has a script that goes 'if clicked - if horse equals zero, set 'horse' to (the number clicked)'. This allows you to pick a horse. Now make a script for each horse that says 'when green clicked, forever, if 'horse' > zero, move random between 1 and 10 steps, until touching finish line'. This makes it so each horse moves at a random speed towards the finish line. Next, make 5 scripts for finish line which go 'if touching (first horse), if 'horse equals one, then increase money by 10', or whatever. Repeat for other horses, but with different numbers for 'horse' and the horses number.

Vice versa for if your horse loses.

Hope this helps.


92% of teens have moved on to rap.
If you are part of the 8% who still listen to real music, copy and paste this into your signature

Offline

 

#3 2007-12-15 02:16:12

rocky007
Scratcher
Registered: 2007-12-15
Posts: 1

Re: horse betting

Thanx for the Information !

____________________________
Online Sports Betting Odds, Tips UK
Online Horse Racing Betting Odds UK

Last edited by rocky007 (2007-12-28 04:12:11)

Offline

 

Board footer