Alice Community  

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

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Help on sequence of triggered events?
Junior Member
Status: Offline
Posts: 9
Join Date: Dec 2012
Question Help on sequence of triggered events? - 01-10-2013, 06:14 PM

I am working on the Save the Lunch Lady assignment (Chap 6 - Pg 210 in Learning to Program with Alice). I have it working up to when the 3rd tray should turn when I click on the Ninja. I have tried several combinations, but I can't figure out why I can't continue to turn the trays when a Ninja is clicked. Many of the combinations I tried ended up turning all the trays at once.

I am attaching what I have completed so far. Any direction is greatly appreciated. My assignment is due this weekend.
Also: Here is the actual assignment if you need any additional information -
Create a game where the goal is to save the Lunch Lady from the danger of an Evil
Ninja. A ninja will appear at random locations within the cafeteria, pause for 1 second,
and then disappear, only to reappear at another random location. The player’s task is to
click on the Ninja each time it appears in the world. Each time the player is successful
in clicking on the Ninja, a cafeteria tray will appear (upper left of the window). To win
the game, the Ninja has to be clicked five times (and five cafeteria trays be displayed) to
send the Ninja away forever.
Create a world and add the Cafeteria, the LunchLady, two CafeteriaTables, and
several CafeteriaChairs (all from High School). Add the EvilNinja (from People).
The first goal is to get the Ninja to move around to random locations within the cafeteria.
Create a method named moveAround for the EvilNinja. This method should
move the ninja a random distance from where it currently is, without moving off the
To check whether the player has successfully clicked on the Ninja, create a
method named checkIfNinja for the Ninja. The checkIfNinja method will need an
object parameter named who. Create an event When the mouse is clicked on anything,
and have it call the checkIfNinja method, sending the object clicked to the who
Attached Files
File Type: a2w SavetheLunchLady2.a2w (2.87 MB, 17 views)
Reply With Quote

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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.