ID:1522450
 


Problem description:

I created this earlier but deleted it by mistake.

I'm looking for a way to pass an obj by value, not by reference. I know in other languages this is done with something like .copy or .clone.

I've tried a copy constructor but constructor overloading apparently isn't supported in DM.

Would I just have to create a proc to manually copy objs.
Try a_atom.vars = b_atoms.vars? Alternatively you could for() through vars and copy them one by one even though that's a bit cumbersome.

This topic is a bit intensive no matter what you plan to do + prone to run-times depending on the situation. Could you explain what you're doing this for in case there's an easier solution?
An oldie, but a good one.

http://www.byond.com/forum/?post=195130
In response to Pirion
I see, thank you. Ended up doing something similar to this.