Alice Community  

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

Reply
 
Thread Tools Display Modes
Chapter 9 Exercise 1 The Wave
Old
chunter
Guest
 
Status:
Posts: n/a
Question Chapter 9 Exercise 1 The Wave - 04-22-2010, 03:12 PM

I have set the animation up with the coach, student1, skaterGirl, and randomGuy2. I am using For all in order and a world variable list. The problem I have is the skateGirl and randomGuy2 does the wave with arm forward movement. The coach and student1 does the wave with arm left movement. How can I get all of them to use they same movement type so I can use one variable with all four of them in a list?
   
Reply With Quote
Problem Correct
Old
chunter
Guest
 
Status:
Posts: n/a
Default Problem Correct - 04-22-2010, 04:36 PM

I found the problem.
   
Reply With Quote
Old
poolebj
Junior Member
 
Status: Offline
Posts: 4
Join Date: Apr 2012
Default 05-07-2012, 10:06 PM

What was the problem? I'm having the same issue
   
Reply With Quote
Old
shan841
Junior Member
 
Status: Offline
Posts: 1
Join Date: Nov 2014
Default 12-15-2014, 10:43 AM

Curious how others did this?? The only way I could make this work was to create two different lists/methods, one for skatergirl & random guy, and another for coach & student.
   
Reply With Quote
Bad problem
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default Bad problem - 12-15-2014, 08:04 PM

IMHO this is a terrible problem. What it says and implies by the picture is that these objects can all be programmed in a list to do the wave. The problem is, as you pointed out, that if you try and use the characters shown, it will never work.
The reason it does not work is that the objects are not all built the same so that the steps in getting one object to wave is not the same as getting another one to wave. This is not to say that all the characters have to be the same type of object, just that they need to be structured the same. If you look at the coach, he has a his arms attached to his upper body and each arm has a hand sub-object. The Random Girl 1, by contrast, has shoulder sub-objects directly beneath the main object. In addition, the sub-objects are arm->forearm->hand. And the Random Guy 1 is different than either of the objects above
he has arms coming off his upper body (like the coach) but the arms consist of arm->elbow->forearm->hand.

In short there is no sane way to program Alice using lists because the sequence of sub-objects from the main character to its hand are different. While you could write a method that test for the type of object and executes different instructions for each type, that kind of defeats the purpose of the exercise.

Mark


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote
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
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default 12-16-2014, 03:26 PM

Hi,

Great information and thinking outside the box!
My problem with the exercise is that any answer tends to obscure what the chapter is trying to show case. That of using lists and instructions. Can the objective be accomplished? Yes, this thread has talked about 3 ways to succeed
  1. Different lists for different kinds of objects
  2. Making the method "object aware."
  3. Using Poses to make the characters wave.

But at some point the main idea and implementation of a List becomes less and less front and center.

Mark

P.S. I have found over the years that many of Alice's "Quirks" were not quirks but the natural result of the rendering paradigm used to make the movie. If the object is not actively in a scene, the method I am waiting for might never be executed. The result is that situations like making an object invisible can cause unexpected side effects.

Quote:
Originally Posted by MrMoke View Post
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


Mark Henwood
mhenwood@ieee.org
   
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 ©2020, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.