Quote:
Each of these animations on these objects has a common suffix, so we attach our prefix in code before polling to retrieve the object ID.
How do you know what prefix to use? Are there just some known text names like "power_"?
Quote:
I'm more interested to hear about the alternative to polling and "announcement."
altiaInitDesign is a built-in animation that gets set when the design is loaded.
I'm thinking that each object can have a tiny piece of Control code on it and perhaps they can all report their IDs to a single animation. For instance, if the object ID was held in an animation called
862_objID, it might look like this:
Code:
WHEN altiaInitDesign ==
EXPR _global_MyCloneID == 862_objID
END
Then the code on a different item might be:
Code:
WHEN altiaInitDesign ==
EXPR _global_MyCloneID == 1273_objID
END
You'd end up with a string of numbers sent to the
_global_MyCloneID animation at startup. You could then use AtSelectEvent/AtNextEvent or AtAddCallback to process those incoming numbers whenever you wanted (just like any other event).
I use the
_global_ prefix here since it doesn't get renamed when you copy an object. That way, new objects you create from copy/paste will be all set to announce themselves.