Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Thread Tools Display Modes
Alice Assignment 4
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
Theres a better way, but not bad :)
Senior Member
RavenOfCode's Avatar
Status: Offline
Posts: 409
Join Date: Oct 2013
Location: Northern Virginia
Post Theres a better way, but not bad :) - 02-16-2014, 10:08 AM

You dont need the variable all you need is drag the random number to distance.

It looks like this,

RandomGuy move up (random number, min=0 max=1) duration 1 sec

Stuff + Other Stuff + Different Other Stuff = Things :)

My best Alice game:

Clash of the Cubes (an arena fighting game):
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.