Alice Community  

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

Reply
 
Thread Tools Display Modes
Select Multiple Objects
Old
Norwegian
Guest
 
Status:
Posts: n/a
Question Select Multiple Objects - 02-01-2009, 06:41 PM

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.
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.

Last edited by Norwegian; 02-01-2009 at 06:51 PM. Reason: I decided to add more detail.
   
Reply With Quote
Old
Mojax
Guest
 
Status:
Posts: n/a
Default 02-13-2009, 03: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.
   
Reply With Quote
Reply

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.