All actors are destroyed?

mightybobmightybob Member Posts: 6
edited November -1 in Working with GS (Mac)
Hi, I have a problem.I have a background actor that spawns Enemy actors at set intervals. When I click an Enemy actor, I play a sound and it is destroyed. Simple. However, if two or more Enemy actors have been spawned, they are ALL destroyed, not just the one I clicked?

What gives?

Hope you guys can help me!

/Bob

Comments

  • wroachbarrettewroachbarrette Member Posts: 101
    you have set the game to think than when it receives a click it is to destroy all the actors specified under that condition you either have to fix that condition to specify only that one actor or you could just create as many actors as you need to spawn at once
  • mightybobmightybob Member Posts: 6
    Hi, thanks for your reply! How could I specify the one actor? The DESTROY does not have any parameters?

    I'm simply using a WHEN CLICKED rule, then playing a sound and then Destroying the actor.
  • mightybobmightybob Member Posts: 6
    Hi,

    I managed to solve the problem. I had the actor listening for ONKEYDOWN (which listens to a pressed key in general), and not for TOUCH (which then listens for a click on the specific actor).

    Changing to TOUCH solved it.

    Just figured someone else would benefit from this.

    /Bob
Sign In or Register to comment.