Alice Community  

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

Reply
 
Thread Tools Display Modes
Copying Objects
Old
crazychimp132
Guest
 
Status:
Posts: n/a
Default Copying Objects - 10-01-2005, 09:37 PM

Is there a method that makes a copy of an object? I can't find anything on this, but I think it would be useful.
   
Reply With Quote
Old
gabe
Administrator
 
gabe's Avatar
 
Status: Offline
Posts: 461
Join Date: Jul 2005
Location: Pittsburgh, PA
Default 10-02-2005, 03:16 AM

I'm not sure I fully understand what you're asking. Are you asking how to make a copy of an object without having to drag it in from the gallery twice? If so, you can do this by:

1. Open the "add objects" screen
2. Click the copy objects button, located in the upper right corner of the screen in the cluster of buttons that have faces on them. It's the last one.
3. Click the object you wish to copy and drag it to another location. Make sure to re-select the arrow or other option afterwards, so when you click on it again, you don't make another copy inadvertently.

If you are asking how to write a method that duplicates an object, I don't believe it is possible. What you can do is make multiple objects and make them invisible by default, and then make it appear as though the original is duplicating by making the copies visible again. You can find this option under the object properties. The tile is named "isShowing" and is set to true by default.
   
Reply With Quote
Old
crazychimp132
Guest
 
Status:
Posts: n/a
Default 10-03-2005, 03:27 PM

I meant the latter, a method that copies an object so it can happen while the world is running. I do think it would be useful to have this feature. I'll give a very basic example- a world in which there is a gardener who plants flowers at random- each time a flower is planted, a copy of the flower object is made and placed. Without a copy method, the programmer would never be able to add enough flowers to the world mannually, since the world can run forever. Also, it would be much less tedious to make copies as they were needed than making one flower after another visible.

On the other hand, I do understand why having the ability to make copies could be confusing- how does Alice display objects that have not been created yet, and may never be, on the objects list?
   
Reply With Quote
Old
gabe
Administrator
 
gabe's Avatar
 
Status: Offline
Posts: 461
Join Date: Jul 2005
Location: Pittsburgh, PA
Default 10-03-2005, 03:46 PM

OK, I understand what you're saying now. I can see several problems with implementing the ability to add an object from within a method (and no doubt our programmer will have much more to say ;-)).

If you think this feature would be useful to have, please post your suggestion in the Suggestion Box subforum so we can have a nice consolidation of ideas for which to go to when adding functionality. I do think this is a good idea.
   
Reply With Quote
What does the copy button actually do?
Old
johnscub1
Junior Member
 
Status: Offline
Posts: 2
Join Date: Jun 2011
Location: Trappe, PA
Default What does the copy button actually do? - 07-14-2011, 10:50 AM

While on the topic of copying, what is the difference between using the copy button, and creating another instance of the object from the library?
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 07-14-2011, 01:37 PM

There isn't one, provided you've made no modifications to the object since you've imported it originally. If you've even moved its subparts a little, copying it will preserve those changes.
   
Reply With Quote
Old
ElectricKirby
Senior Member
 
ElectricKirby's Avatar
 
Status: Offline
Posts: 164
Join Date: May 2011
Location: Dreamland, Planet Popstar
Default 07-14-2011, 05:08 PM

http://www.alice.org/community/showthread.php?t=6831


My Favorite Resources:
Uploading Images - http://tinypic.com/

File Sharing - http://www.4shared.com/

Textures - http://www.filterforge.com/

Convertible Game-Ripped Models - http://models-resource.com/

Music - http://www.brawlcustommusic.com/gamelist
   
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 ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.