alice-teacher events without if statements

Vanderhyde, James vanderhyde at sxu.edu
Tue Feb 18 13:32:31 EST 2020


Don, thanks for your help.

It seems like key events are better, because the programmer can access the pressed/released options. On the other hand mouse click events are better, because the programmer can specify exactly which objects can be clicked on. I wish both types of events had both features.

I can almost get the same functionality as “while something is true” by adding a timer event with the time set to 0. Then it is triggered every frame and I can check something with an if block. Most of the things we needed to do with “while something is true” or “when something becomes true” have to do with collision detection anyway, and now there is an event for that. I’m just going to have to rearrange the order I teach some things, so collision detection can go earlier and things that in Alice 3 require if blocks can go later.

Apparently there is no equivalent of the “during” part of an Alice 2 event, but that was always something of a hack anyway. Objects can get into weird states when they stop in the middle of doing something.

James
—
James Vanderhyde
Associate Professor and Department Chair
Computer Science
Saint Xavier University
3700 W. 103rd St.
Chicago, IL 60655
773-298-3454

On Feb 18, 2020, at 11:36 AM, Don Slater <don at alice.org<mailto:don at alice.org>> wrote:

James,
It seems that I have been nothing but a disappointment to you this week. There really is not a way that I have found to implement the functionality that you are looking for.

Perhaps the community has thoughts?

All the best,
Don Slater

Alice Project

On Feb 17, 2020, at 3:08 PM, Vanderhyde, James <vanderhyde at sxu.edu<mailto:vanderhyde at sxu.edu>> wrote:

In Alice 3, is there a way to handle different key events before introducing if blocks? In Alice 2, we used to use a separate event for each key, and then call a method. In Alice 3, I have to use “if event isKey(key)” in an if structure in order to call separate procedures for separate keys. (See screenshot.) Is there another way? I wanted to delay teaching if blocks just a little longer.

James
—
James Vanderhyde
Associate Professor and Department Chair
Computer Science
Saint Xavier University
3700 W. 103rd St.
Chicago, IL 60655
773-298-3454
<screenshot.png>
_______________________________________________
alice-teachers mailing list
alice-teachers at lists.andrew.cmu.edu<mailto:alice-teachers at lists.andrew.cmu.edu>
To change settings or unsubscribe visit:
https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers

_______________________________________________
alice-teachers mailing list
alice-teachers at lists.andrew.cmu.edu<mailto:alice-teachers at lists.andrew.cmu.edu>
To change settings or unsubscribe visit:
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/20200218/9af87876/attachment.html>


More information about the alice-teachers mailing list