I was "coding" a system to make NPC's talk to you in a platformer. I though that it would be time saving putting all NPC's in a family and using family variables to retrieve the desired text from a dictionary object. The problem I'm having in the little prototype I did, is that for some reason only one of the two objects in the family is working.
What needs to happen is:
on up arrow pressed
>player is overlaping (Family) = (Family) add 1 to (Value)
So every time the player presses UP a new line of dialog is displayed thanks to this next line of code:
Every Tick = Set Dialog(text) to (Dictionary)key(""&Family(value))
One of the Objects works perfectly, but the other does nothing. I checked every line of code 100 times and I cant find a mistake, I think is a limitation on how Family Instance Variables work.
Could someone check the .capx and tell me if there is a way to solve this?