Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Thread Tools Display Modes
Random hit
Posts: n/a
Exclamation Random hit - 08-02-2011, 01:31 PM

Hello all. I am working on a baseball game but can't find how to make the batter hit a random hit (Single, double, triples, home runs. That stuff)
Reply With Quote
Senior Member
DensetsuNoKaboom's Avatar
Status: Offline
Posts: 1,188
Join Date: May 2010
Location: e4eaf2
Default 08-02-2011, 04:32 PM

Find "choose true probabilityOfTrue of the time" under world's functions and put that in an If/Else, like in the pictures. Then put in what you want to happen under each probability. In the last screenshot I show how to make, for example, a 25% chance of each action happening. Does this help?
Attached Images
File Type: jpg 1.JPG (7.0 KB, 20 views)
File Type: jpg 2.JPG (14.2 KB, 20 views)
File Type: jpg 3.JPG (31.3 KB, 19 views)

Thank you for taking the time to read this signature. This signature loves you.
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 ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.