Alice Community  

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

Reply
 
Thread Tools Display Modes
Working on a project in class and was looking for some advice
Old
jamierterrell
Junior Member
 
Status: Offline
Posts: 1
Join Date: Jul 2011
Default Working on a project in class and was looking for some advice - 07-27-2011, 10:20 AM

We are doing the infamous Rock, Paper, Scissors project and I have gotten off to a good start but I need help randomizing the poses for my hands. Any advice would be helpful please.
Attached Files
File Type: a2w RockPaperScissors.a2w (12.32 MB, 4 views)
   
Reply With Quote
Old
Nighthawk0973
Senior Member
 
Nighthawk0973's Avatar
 
Status: Offline
Posts: 240
Join Date: May 2011
Location: In front of my computer.
Default 07-27-2011, 12:47 PM

Random numbers, with the range being from 1-3. Than you just make if statements:

Code:
if(randomHandPosition == 1) 
//code for rock goes here
else 
if(randomHandPosition == 2)
//code for paper goes here
else 
if(randomHandPosition == 3)
//code for sizors goes here (fail spelling on sissors, I'll keep it there for laughs :D)
else
That's it. I don't know that much about alice and random numbers since I only make games with alice, and games require Intelligent AI, not random enemy movement
   
Reply With Quote
Reply


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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.