EDIT: wait sorry, I may have misunderstood your original issue. I tend to use "wait 0" often and tends to behave correctly. I never risk a newly created object without using "wait 0", but perhaps there are specific times where this is OK. When is the 2nd function without a UID parameter called? If there's multiple of that one object, and no UID is specified, perhaps C3 is picking whatever first instance of that object that exists, then picking it's children and such.
EDIT 2: oh wait, I just understood the colour-coded purple shows the 2nd function being called. From what I understand, if the 2nd function doesn't have "copy picked" or a UID to pass, then the 2nd function effectively "doesn't know" which instance to pick, so I guess unexpected behaviour happens. I'd always pass a UID just to be crystal clear for C3 to know which instance to pick (or copy picked if that works after a "wait 0").
I always use "wait 0" on a "on created" event. Like every object that gets created, I have an "initialise" function or custom action for that object, but it seems that "wait 0" is always needed before calling the function.
I think it's related to the whole "objects don't necessarily exist until the bottom of the event sheet/next tick" or something similar to this, so a "wait 0" solves this.
Doesn't seem to cause issues as far as I am aware, even if multiple objects are created on the same tick and such. But yeah, hmm.
Yes, sorry about the coloring, Photoshop tricked me to add the same color to the text in both places, making it a bit more confusing.
Thank you for your reply. I run into this issue a lot, and I try to avoid using Wait 0 because it causes assets to flicker (eg.: i create the body, and then wait 0, and then the eyes—you will notice how the eyes get created slightly later; or if I need to replace something, again using Wait 0 will cause a flicker.)
I think it's related to the whole "objects don't necessarily exist until the bottom of the event sheet/next tick" or something similar to this, so a "wait 0" solves this.
Yes but you see, one function picks it in the same tick, the other doesn't.