Store Reference Behaviour (v1.0)
Current problem in Construct 2:
It is not very straightforward to stablish relationships between gameobjects. If two objects A and B are related, then A must keep a variable with B's IID or UID and then keep checking which object has that id value. This may lead to repetitive code to keep variables that don't really store the object B, but only its identification.
Besides that, that way of coding doesn't allow you to keep, for a same object, a relationship to a variable amount of objects (unless you store IIDs or UIDs on an Array object, but that will increase the complexity of your project a lot).
Instances can hold Text, Boolean or Number variables. This behaviour creates the possibility for Object variables, in which you can store and retrieve objects. It allows your object to have as many variables as you want.
This is how you store objects:
And this is one of the ways to retrieve them:
As you can see, object variables are different from the usual variables because they are actually an array of objects. That gives you much more power to hold as many objects as you want.
I hope you enjoy it. Suggestions are welcome!
Behaviour Download (v1.0)