alice-teacher switching which object is controlled by arrows

Don Slater dslater at andrew.cmu.edu
Wed Nov 23 12:35:19 EST 2011


Let me send my thoughts to these questions in two different messages… I have attached a world "lilfishWaggle.a2w"

An example of how you might animate the swimming motion of a fish:

It is my experience that fish are almost always in motion, at least their fins and gills, even if they are "stationary" - not moving. An so, in this animation, I want the fish's swim motion to run continually, even if I am not moving that fish at a particular moment.

In this sample world, I am using a lilifish from the gallery. (This was a convenient choice as it has a built in "waggle" method, that animates fish movement. I modified this method so that the motion the fins and gill remained, but that the fish did not move anywhere.)

I then created an event "When the world starts", which calls the waggle method of the lilifish… When I click the "play" button, the motion starts, and because of the while (true) loop, this animation will continue whether I move the fish or not…

Note that I have also created another event "Let the camera control" the lilFish, and in "My first method" set the camera's vehicle to the lilfish.

Please let me know if you have any questions.

Later,
Don Slater

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lilFishWaggle.a2w
Type: application/octet-stream
Size: 4138931 bytes
Desc: not available
Url : https://lists.andrew.cmu.edu/mailman/private/alice-teachers/attachments/20111123/72d805b8/attachment-0001.obj 
-------------- next part --------------
 


On Nov 17, 2011, at 10:13 AM, Emily Higgins wrote:

> Hello -
> Thank you to the person that reminded me to put my topic in the subject line.  I have a student who is trying to make a scene in which the user can choose which object to control with arrow keys.  The objects, both fish, moves fins all the time, so he both needs to have the selected fish do its "swim" method and be controlled.  Then, if the user clicks on a different fish, that fish should do its "swim" method and be controlled by arrows. It seems like I should be able to have him use a parameter that is assigned upon being clicked and then switch with fish is swimming or being controlled.  
> 
> Thank you,
> Emily Higgins
> Boothbay Harbor, Maine
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers



More information about the alice-teachers mailing list