Help WIth Actor Spawning
![forali](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
I am creating a game that requires when you press number keys 0-1 it would change/spawn the character assigned to the key, so if i press 1 it spawns character1, and if i press two it spawns character 2. Okay I have the rule set if key 1 is pressed spawn char 1, that all works, but the problem I am having is when i spawn character two it will not delete character one, so character two just stays on screen. i have the rule under the spawn that says if key 2 is pressed destroy actor one.(yes i realize i after to do every other key except one to have it destroyed) But this isnt working. Does anyone know how to solve this?
Thanks
Thanks
Comments
-create a global attribute and name it ActorID and set it to integer.
-in your actor make a rule
RULE
->if game.ActorID = 1
-->change actor image to type 1
---> spawn bullet type 1
otherwise
-->change actor image to type 2
---> spawn bullet type 2
In your button change the glocal attribute ActorID to 1 & 2 when press accordingly. There it is, no moving off screen and no destroying.