View Single Post
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