Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Deletion of original object

Author
Message
george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 9th Dec 2017 19:55
Is it safe regarding the cloned object?
I've already made a test with the following code snippet and it seems that works OK, since I am not sure that the test result is circumstantial


blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 10th Dec 2017 01:24
Doco says this;
"Copies an object into a new ID, the new object is completely separate from the original object. Cloning an instanced object will produce another instance that shares vertex data with the original object. Returns the ID of the new object. "
So i reckon you'll be fine
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 10th Dec 2017 01:52
I use this method all the time.
Granted, I've never tried to delete the original, just set it to invisible by default and set the clones visible.
Instanced objects.. different story
george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 10th Dec 2017 06:19 Edited at: 10th Dec 2017 06:23
Quote: "
Cloning an instanced object will produce another instance that shares vertex data with the original object
"

Where are the common vertex data are stored? Not with the original object? If I delete the original object I suppose I will loose the vertex data
What are the differences between the LoadObject, CloneObject and InstanceObject commands?
Do I have a benefit if I use the CloneObject rather that the LoadObject command?
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 10th Dec 2017 09:36
Its a new object but it copies the properties of the original object at the time of cloning, after that its not effected by the original object in any way.
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu

Login to post a reply

Server time is: 2024-03-28 11:23:35
Your offset time is: 2024-03-28 11:23:35