Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Alice Assignment 4
Old
HalBen18
Junior Member
 
Status: Offline
Posts: 12
Join Date: Jan 2014
Location: Cedar Hill, TX
Post Alice Assignment 4 - 02-15-2014, 07:47 PM

This was a fairly easy assignment. The hardest part was getting the characters to jump using random numbers but I figured it out a method that worked for me. This is what I did:

1. I created a method called jump for my character.
2. In the method, I had my character move up 1 meter. Then move down 1 meter.
3. I created a variable named distance. I set the value to one.
4. I dragged the distance variable above my character move up.
5. I dragged the random number function to the set value of distance.
6. I changed the move values to distance.

This is what it looked like:
distance set value to random number (min 0, max 1)
character move up distance
character move down distance
   
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.