- When I store the UID of an object in another objects private variable "parent", could I acess this stored object in a way like: (cube.Value('parent')).X ? I know that this does not work, but maybe there is a way to access the object in a similar way? The only solution I had is:
pick object by comparison cube.Value('parent') is Equal to circle.UID
This does work, yet only if you also know the kind of obect that the parent is. When you want to be more flexible, like spawn a bullet from different kind of enemies and store from which enemy (the parent), and access some variabel of the enemy, how would you achieve this in a more flexible way?
1. You could store a value in a "enemyType" variable, I guess.
2. You could check out things like Containers (which links together one instance of several objects into a group) or the Pairer Object (which links together any number of instances of two objects into a group). For something like an enemy that shoots many bullets, the Pairer object is probably the way to go for what you want to do... whatever it is that you want to do . Of course I might be confused about what it is you want to do, perhaps you could be more specific? Posting a .cap always helps.
Also... I'm going to go out on a limb here and say you came from an MMF background? Usually the only people who are concerned with object UID's are ones who are familiar with MMF. In Construct you really don't need to be except under rare curcumstances. 99% of the time you won't ever have to even think about an object's UID.
If you ever want to perform a task and you're falling back on UID's, don't be afraid to post an example .cap and say "how would I do this in Construct?" Chances are there is an easier way that what you're attempting.