Alice Community  

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Or- Don't be a Poser
Old
MrMoke
Senior Member
 
MrMoke's Avatar
 
Status: Offline
Posts: 501
Join Date: Sep 2007
Location: Austin, Texas
Wink Or- Don't be a Poser - 05-10-2015, 05:23 PM

Just remember that poses are not always an efficient solution to a programming algorithm, and that there are many other viable solutions. The attached proggie uses only a single array, and the positions of the objects in the array to generate a random number of steps.

I left a key item visible so that you could see what's going on, but it can easily be made invisible. There is also no need for a function because the stepcount variable is global.

The two code blocks are disabled, so you can enable the first to view it, then disable it and enable the second to run the test.

Collisions are sometimes good for you
Attached Files
File Type: a2w spinner.a2w (337.6 KB, 3 views)
   
Reply With Quote
 

Tags
spinner

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