alice-teacher Combining objects 2.4.2

Don Slater dslater at andrew.cmu.edu
Thu Dec 4 12:52:35 EST 2014


James,
That is a very clever solution… Thank you!

All the best,
Don Slater

> On Dec 4, 2014, at 9:57 AM, James Vanderhyde <jvanderhyde at benedictine.edu> wrote:
> 
> There is no way to combine objects into 1 object in Alice 2. But there are some things you can do for a similar effect. If you want to access all the parts of the road in a program, then putting them in a list and using one of the list loop structures is the way to go. If you want to be able to move them all together, you can create a dummy object (or some other object that is easier to grab), and set the vehicle property of all the road pieces to the dummy object. Then when you move the dummy object, the whole road will go with it.
> 
> Now that I think about, if you combine these two approaches, you are essentially combining objects into 1 object. You can make the list of roads a property of the dummy object. I’m attaching a screenshot that shows an example. In my example, the vehicle property of the road pieces is set to the road sign.
> 
> James
> --
> Dr. James Vanderhyde
> Math and Computer Science
> Benedictine College
> jvanderhyde at benedictine.edu <mailto:jvanderhyde at benedictine.edu>
> http://vanderhyde.us/~james/pro/ <http://vanderhyde.us/~james/pro/>
> 
> <Screen Shot 2014-12-04 at 8.54.28 AM.png>
>> On Dec 3, 2014, at 4:09 PM, Laurie Solomon Cohen <lscohen613 at aol.com <mailto:lscohen613 at aol.com>> wrote:
>> 
>> My students have created a circular race track with multiple parts of road, turn 2, turn 3, etc... Is there a way to combine all these to be 1 Object? Or would he have to just do a DoTogether with all of them?
>> 
>> Laurie Cohen
>> Yeshiva of Greater Washington
>> Silver Spring, MD
>> _______________________________________________
>> alice-teachers mailing list
>> alice-teachers at lists.andrew.cmu.edu <mailto:alice-teachers at lists.andrew.cmu.edu>
>> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers
> 
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> 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/20141204/3dc20d04/attachment.html 


More information about the alice-teachers mailing list