I feel your pain trying to keep things straight when calling multiple functions against a newly created object. However, you're actually running into a different issue here. Check this out in the manual: https://www.scirra.com/manual/142/families
[quote:15e3ztoi]Picking families in events
Families pick instances in the event sheet independently of the object types in the family. For example, consider Family1 consisting of SpriteA and SpriteB. Conditions for Family1 will never affect which SpriteA and SpriteB instances are picked. It will only affect which instances are affected when running an action for Family1. Likewise, conditions picking SpriteA and SpriteB instances will never affect which instances are picked in Family1. In other words, in the event sheet families are treated like an entirely separate object type, which just happens to have instances from other object types.
So, for example, in your Button2 On clicked event, you're creating child objects and then trying to pick randomly against the Family. The Family is a different object, and can't see the child objects until you hit a top level event. If you were to instead create a new Family1 object instead of the red/green/blue objects, it then works (however that's not an ideal solution either because when you create a new Family object, it randomly picks a child object to create). Also, you don't need the Wait in this case.
As far as the function calls (Button1), you're running into three issues . The first is the same as the issue above, where you're creating red/green/blue objects, but then trying to pick a Family object in the "Choose random color" function. The second issue is that you're assigning Master's color to the return value of the current function, not the one you're calling.
When trying to assign something to the return value of a function, use this:
Set Color to Function.Call("Choose random color")[/code:15e3ztoi]
But there's one more thing, and this is the thing you're talking about in your post, is that the object isn't ready for picking unless you specify UID (like you do in the first two function calls). So, to put all three things together and get the desired outcome,
1) Create a Family object in the "Set color" function
2) use [code:15e3ztoi]Set Color to Function.Call("Choose random color",Family1.UID)[/code:15e3ztoi]
3) Delete the "Pick a random Family1 instance" condition and replace it with Family1 > Pick instance with UID Function.Param(0).
I realize this doesn't completely get you where you want to be because you might not want to create random objects, but hopefully it clears up what's going on with picking