alice-teacher addObjectMover Event Listener in Alice 3
Don Slater
dslater at andrew.cmu.edu
Mon Mar 3 14:59:01 EST 2014
Courtney,
She will not be able to do what she would like with the addObjectMover event listener. Essentially, addObjectMover is a method that is invoked when the program starts to run, and it executes continually while the program is running. And we do not provide access to edit the method so that you can stop at at any time. So the initial parameter that is passed is assigned when the method runs, and like any paramour to an executing method, it cannot be reassigned while the method is running. Does that make sense?
AddObjectMover was designed to be a simple event for those cases in which a student wants to move a single character throughout an animation (as in the case of most first-person exploration games). For the more complex case your student is interested in, she will need to build an addKeyListener event that sorts through the different cases.
Let me know if you have more questions.
All the best,
Don Slater
On Mar 3, 2014, at 10:20 AM, courtney bein <courtney.bein at oracle.com> wrote:
> Hello,
>
> One of my students was wondering if its possible to start and stop the addObjectMover event listener in Alice 3.
>
> In her animation, she wants to control one object with the arrow keys, but then (if x happens) stop control of that object and start controlling a different object with the keyboard keys.
>
> Regards,
> Courtney
> _______________________________________________
> 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: http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20140303/cd8d97f2/attachment.html
More information about the alice-teachers
mailing list