Alice Community  

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

Reply
 
Thread Tools Display Modes
save a random number to a variable
Old
brunkdaddy
Guest
 
Status:
Posts: n/a
Default save a random number to a variable - 05-09-2010, 03:08 AM

hey guys,

can i save a random number to a variable so I can later read it and use it to get an object to announce its distance left of and distance forward of another object?

If not, what is the best way to determine how far left, and how far forward an object is from another?

Cheers.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 05-09-2010, 08:20 AM

There is a function in every object's function tab that says "object's distance to the left of (other object)" and one for the right also. Use that to determine distance when you need it.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Reply

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