Im trying to create a whack-a-mole type game. Everything game wise has been completed the only addition I want to make is to the characters that spawn. I have 5 characters in a family and currently have a random family object spawning at various positions on screen at various intervals. All is working fine as is. The thing is I dont want to have 2 of the same character on screen at the same time. I created a family instance variable called onScreen and set it to false. If the character is spawned it changes to true. After a certain amount of time the object is destroyed. The problem is this does not work, if the object never exists on screen it will not spawn.
I read another forum post that suggested always have the characters off screen and set to false, then when you want the character to 'spawn' just change the position to where you need. This worked slightly - but every character in the family moved at the same time to the same position. Not one at a time. If I knew how to select just one family object I could continue with this approach.
Does anyone know of a way to acheive this?