View Single Post
Randomize Bowling Pins Falling
Old
djslater107
Administrator
 
Status: Offline
Posts: 190
Join Date: Jan 2007
Default Randomize Bowling Pins Falling - 07-04-2020, 02:13 PM

Use the For All In Order control structure with your array of pins.

Also, you will need a count variable of how many pins fall, and use that count to help determine whether you win or lose

Inside the For All In Order - for each pin
  • [LI] if (choose true <probability of true> of the time) - from the World functions tab[/LI]
    • [LI]pin fall(set duration to very small number so it looks like they are happening together)[/LI]
      [LI] increase count by 1[/LI]
    [LI] Look at count value to determine win or lose

Hope this helps.

Don Slater
Alice Project


Don Slater
Alice Team
Carnegie Mellon University
   
Reply With Quote