<font face="Verdana, Arial, Helvetica, sans-serif"><font size="6"><center><img src="https://dl.dropboxusercontent.com/u/94904214/Store-reference/code-imgs/PluginIcon.png" border="0">
Store Reference Behaviour (v1.0)</center></font>
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).
The Behaviour:
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:
<img src="https://dl.dropboxusercontent.com/u/94904214/Store-reference/code-imgs/collision.png" border="0">
And this is one of the ways to retrieve them:
<img src="https://dl.dropboxusercontent.com/u/94904214/Store-reference/code-imgs/launch.png" border="0">
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!
Links:
Behaviour Download (v1.0)
Example
Github Repository</font>