Welcome to my Programming Blog...

I am currently working on a couple of projects: An original game called "Implosion" which I am porting from Flash to the iPad, and a remake of Q*bert in Python (pygame), as part of the class I am teaching. Please feel free to use the "Labels" (at right) to follow a specific project or theme. If you are one of my Python students, I recommend that you check out the Python thread.

Sunday, April 18, 2010

Aha!

Ok, I found it. (How to dynamically clone objects in SIO2...) I'll post it here, in case I need it again. (Dear reader, don't worry about these details... just know that it works.)
In the code for SIO2's Tutorial061, in template.mm, lines 310-328 show how to do it. Specifically, provided that _SIO2Parent is not a pseudo instance, (I.e., it doesn't end with ".001"), then you can say

_SIO2Duplicate = sio2ObjectSoftCopy (_SIO2Parent, name)

...where "name" is the new name of the object, and "_SIO2Duplicate" is the variable that receives the object.

Cool. This might be doable after all.

No comments:

Post a Comment