Hi guys, I'm a total newbie to Construct and I can't figure out how to access an object instance variable from its Object Family. In other words, whenever the player touches an object family, I would like to know which object from that family the player is touching and what's the value of its instance variable. Is this possible?
You need to define this instance variable on the family. That's what families are for. Then you can get the value from the touched member of the family by comparing Family instance variable, or Family.myInstanceVar in expressions.
If for some reason you still need to know the object name, use Family.ObjectTypeName expression.
Develop games in your browser. Powerful, performant & highly capable.
Ok, thank you so much!!