I am trying to make a probability game where a random card is chosen and you bet on which card it will be with a certain amount of money. I am trying to figure out how i make the script of when a bet is chosen, it chooses a random card. I'm thinking it would do something like broadcast something to a variable. I really dont know! HELP!!!
Offline
Try this. You will need to make 10 costumes. Each will show a number card. So, you could make a costume with a card with a 1 on it. Call it 1, and add a 1 at the end (11). Do this with each costume. (Costume 1: 11, Costume 2: 21, Costume 3: 31, etc.)
ask [what number do you think I'll draw?] and wait set [choice v] to (answer) ask [what's your bet for the number?] and wait set [bet v] to (answer) set [card v] to (pick random (1) to (10) switch to costume (join (card)[1]) if <(choice) = (card)> say [You were right! You get the amount you betted on!] change [the player's points v] by (choice) else say [You were wrong. You lose the amount you betted on.] change [the player's points v] by ((choice) * (-1)) end wait (2) secs say []Hope this helps!
Offline