View Single Post
Or a Good Challenge
Old
MrMoke
Senior Member
 
MrMoke's Avatar
 
Status: Offline
Posts: 501
Join Date: Sep 2007
Location: Austin, Texas
Default Or a Good Challenge - 12-16-2014, 10:31 AM

A few of the important things I’ve learning over the last 47 years or so of programming is to master the language you are using, and use it creatively through experimentation.

One of the things that Alice2 objects have in common is the ability to use Poses that you have captured during the design phase of your project. In this instance, we have a fixed number of objects, so the objects and poses can be stored in “either Lists or Arrays” and they will work the same when referenced with a single index value.

Your job is to think beyond drag-and-drop, and instead build the project “Before” you start coding. If you were standing up and wanted to wave to someone, how many unique positions (aka: poses), including repeatable, would be needed? Now use your mental list of positions to build those poses into each character. The only thing finite here is the step count, not the poses, so the waves don’t have to look the same.

Once complete you can use loops to activate the poses on the items in the Object and Pose arrays. This can be done in straight-line code, or using mouse-click events where the object clicked is passed in as a parameter.

The attached demo is small example. Note that the setup time was much longer than the coding phase. My finished project is much more sophisticated. Have fun and remember that your C.O. might be watching
Attached Files
File Type: a2w WaversDemo.a2w (3.05 MB, 4 views)

Last edited by MrMoke; 12-16-2014 at 10:40 AM.
   
Reply With Quote