Alice Community  

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

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Identical click behavior for a group of objects
Junior Member
Status: Offline
Posts: 5
Join Date: Apr 2014
Default Identical click behavior for a group of objects - 04-25-2014, 05:01 PM

Apologies if this is an obvious question. My son has a world with 6 buildings in it. For 5 of those buildings, if the user clicks on the building, the world should display a message that the building is locked. He knows how to do this with a series of nested if/else statements, but is there a more elegant way to do this? His idea was to have a list of buildings, and when an object is clicked, check to see if that object is a member of that list. But that doesn't seem to be the way lists/arrays work in Alice. But then I'm learning this along with him, so I could very well be missing something.

This is in Alice 2. We've been using the Duke tutorials and the Dann/Cooper/Pausch textbook.
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 ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.