Alice Community  

Go Back   Alice Community > Alice 2 > Works-In-Progress

Thread Tools Display Modes
Need Help Bowling
Junior Member
Status: Offline
Posts: 3
Join Date: Jun 2020
Default Need Help Bowling - 07-03-2020, 02:16 PM

I am having issues randomizing my pins falling and randomizing the bowling game for my term project. I'm not exactly sure how to execute it. There needs to be a winning and losing aspect as well. any help is appreciated!
Attached Files
File Type: a2w bowling.a2w (897.0 KB, 3 views)
Reply With Quote
Randomize Bowling Pins Falling
Status: Offline
Posts: 195
Join Date: Jan 2007
Default Randomize Bowling Pins Falling - 07-04-2020, 03: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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.