Alice Community  

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

Reply
 
Thread Tools Display Modes
How do I combine objects into one?
Old
AdamZ628
Junior Member
 
Status: Offline
Posts: 8
Join Date: Mar 2012
Default How do I combine objects into one? - 10-16-2014, 12:09 PM

Say I want to add a sawblade to the spacerobot's arm, the sawblade is a separate object and , therefore, the spacerobot cannot be saved as a new class.
We're building new enhanced classes based on concepts from Chapter 4's Enhanced clever skater and would like to add classes as subclasses of the parent class to control it all.
Can one add new parts to an existing ALice class?
Adam Z
- HS Alice teacher for 6 years, prog teacher since '93
   
Reply With Quote
Not pretty or perfect but it works.
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default Not pretty or perfect but it works. - 10-17-2014, 01:36 PM

Hi zDog,
Here is my answer. Basically create methods/functions to stick the saw on the robot where you want it and change its vehicle accordingly also save the saw object so the robot can refer to it as needed.
I have done this in the attached movie.
The only problem I have is that the attachableRobot wouldn't export! Not sure why that is but from the error it could just be a Mac thing.

Hope it works for you, let me know

Mark
Attached Files
File Type: a2w RoboSaw.a2w (1.79 MB, 3 views)


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote
Thanks but...
Old
AdamZ628
Junior Member
 
Status: Offline
Posts: 8
Join Date: Mar 2012
Default Thanks but... - 10-20-2014, 09:56 AM

Thanks Mark,
That's a sweet robot example with fantastic methods in usage of boolean switches and the like.
But a value for the variable "attachment" can't be saved into the attachablerobot class. This is the same brickwall I (we) hit and is the reason for the original post. It is not a Mac thing.
So the question remains,
How can we make the sawblade (or any object) become a subclass (like an arm or leg) of the attachablerobot?

Thanks
Adam Z
   
Reply With Quote
My advice
Old
jrrTolkien
Senior Member
 
jrrTolkien's Avatar
 
Status: Offline
Posts: 166
Join Date: Feb 2014
Location: Middle-Earth (Merrimack, NH)
Post My advice - 10-20-2014, 04:43 PM

As far as I know, there isn't a solution to that. I too have wanted to do that in a few of my worlds, but to no avail. The best advice I could offer is the same as what Mark suggested.

However, all the a2c objects are actually zipped folders, so if you open them like a zipped folder, you can see all the subparts as individual files. So, in a perfect world, you should be able to just drag the "Saw" object into the robot's folder. However, we do not live in a perfect world, and for some reason, it's impossible to copy the files while in compressed format. Extracting them does no help, either, try it, and you'll see what I mean. Perhaps in the future it will be possible, though...

-jrr


Arwen: “I would rather share one lifetime with you than face all the Ages of this world alone.”

-April Signature
   
Reply With Quote
Thanks
Old
AdamZ628
Junior Member
 
Status: Offline
Posts: 8
Join Date: Mar 2012
Default Thanks - 10-21-2014, 09:50 AM

Thanks Mr Tolkein,
I was going to go that route today but am glad I checked here first! No reason to take the journey to Mordor if you've already chucked that ring.
Thanks ALice forum dudes. I'll be back often and if anyone needs anything give me a shout,
Adam Z
   
Reply With Quote
Old
sfunk
Senior Member
 
sfunk's Avatar
 
Status: Offline
Posts: 1,112
Join Date: Mar 2011
Location: I don't know
Default 12-16-2014, 07:58 PM

Search Alice gloo, an older member use to make very helpful programs is this gloo project does exactly what you're asking for. artyfishl was the user who created it.


If you are stuck on a project, check out the tutorials I made here at this link:

http://alice.org/community/showthread.php?p=36778#post36778

There are lots of tutorials on it so far, including some youtube videos, check it out

Or..

Go to my youtube channel to check out my alice 2.2 tutorials I have there..

http://www.youtube.com/user/sfunk1992?feature=mhsn
   
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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.