alice-teacher Fwd: position question

Steve Cooper coopers at cs.stanford.edu
Thu Jan 6 17:32:02 EST 2011


I am posting this for Steve Cooper, while I am adjusting his subscription information

Don Slater


From: Steve Cooper <coopers at cs.stanford.edu>
To: Alice educators <alice-teachers at lists.andrew.cmu.edu>
Date: Thu, 6 Jan 2011 14:25:32 -0800
Subject: Re: alice-teacher position question


Ella,
  I think Don's answer is a good one. I'd just like to suggest how to get the penguin back to the pedestal in its original orientation. In the initial scene, add a 3D axes (or really any object), and Set its point of view to the penguin. Now, make the 3D axes invisible. To get the penguin to return to the pedestal, simply use the code penguin.setPointOfView(3Daxes).
Regards,
Steve

On Thu, Jan 6, 2011 at 1:04 PM, Don Slater <dslater at andrew.cmu.edu> wrote:
Ella,
You may want to look at the While BDE event…

Click on the "Create new event" button, and select "While something is true" from the events menu that appears.

Build your test condition for the While <none> is true, and then add statements for when this condition is true the first time (Begin), as long as the condition is true (During), and what should happen when the condition becomes false (End). You may leave "Nothing" as the statement for any of these of these, if appropriate.

For example based on your problem statement;

       While (distance from cone is greater than .2)
               Begin: Nothing
               During: Nothing
               End: return to pedestal

Let me know if you have any other questions.

Later,
Don Slater


On Jan 6, 2011, at 8:53 AM, Ella Glazer wrote:

> One of my students is writing a program that starts with a penguin on a pedestal.  It then walks around (using the mouse).  If it touches a cone, he want the penguin to go back to the original position on the pedestal.  Is there a simple way to do this?
>
> Thanks
>
> Ella Glazer
>
>
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers

_______________________________________________
alice-teachers mailing list
alice-teachers at lists.andrew.cmu.edu
https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers



-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.andrew.cmu.edu/mailman/private/alice-teachers/attachments/20110106/d6b787a1/attachment.html 


More information about the alice-teachers mailing list