Alice Community

Alice Community (
-   How do I...? (
-   -   Select Multiple Objects (

Norwegian 02-01-2009 07:41 PM

Select Multiple Objects
I have a bunch of objects who's properties I want to change, how would i select all of them to change all at the same time?
I put them all into a group but if I select the group then the properties and functions tabs are blank. I want to select all my planes and tell them that their vehicle is the aircraft carrier. :confused:
Ideally I would be able to hold down control and click on all the items in the list, in the top left corner, that I wanted and they would be selected. Then I could tell them all to do something.

Mojax 02-13-2009 04:49 AM

There may be an easier way than what I'm going to tell you, but if there is I'm not aware of it.
Basically you need to create a world variable that is a list, and add all your planes to it.

(btw, I have alice set to "display in Java Style in Color", so my terminology may be a bit different than what you see)

Then create a method that uses the "foralltogether" option from the bottom. set it to the expression "your list name"
Then go to any of the planes, drag in the "vehicle=" property, set it to the carrier, then from the top of your for all together tile, drag the "item_from_list" down in place of the plane name.

so it should look like:
for all "plane.list" every "item from list" together
item_from_list.set (vehicle carrier)

then just drop the method into the start of your program, or set it as a "when world starts" event in the events list.

Otherwise, it's just manually set them all, which may be less confusing, lol.

All times are GMT -5. The time now is 05:24 PM.

Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.