Deleting actor
arantes
Member Posts: 5
Hi all,
I have made an game where an certain actor get spawned when you press the 'start' button. I have also made an 'restart' actor and I want this on to destroy the just apawned actor when this actor get pressed.
I especially choose for this way because I don't want the whole scene or game to be reset.
Now I would like to know if it's possible to destroy an certain (spawned) actor when you pressed another (restart) actor.
I have tried some ways with the game attributes and played around with true and false states but he only checks this attributes when the scene or game is started? Not when you're allready in the scene, or is there a way to 'recheck' these game-attributes?
Thank you in advance,
Arantes
plus: it has to be possible te get this actor again on the stage when the user presses 'start' again.
I have made an game where an certain actor get spawned when you press the 'start' button. I have also made an 'restart' actor and I want this on to destroy the just apawned actor when this actor get pressed.
I especially choose for this way because I don't want the whole scene or game to be reset.
Now I would like to know if it's possible to destroy an certain (spawned) actor when you pressed another (restart) actor.
I have tried some ways with the game attributes and played around with true and false states but he only checks this attributes when the scene or game is started? Not when you're allready in the scene, or is there a way to 'recheck' these game-attributes?
Thank you in advance,
Arantes
plus: it has to be possible te get this actor again on the stage when the user presses 'start' again.
Comments
So touch start it sets a global game attribute to 1 or something in the third invisible actor when that global attribute is 1 spawn actor 2
When actor 2 is pressed destroy and set global attribute to 2
Edit
You can have it spawn at position x and y for the start
Now I have an problem. Because when I delete the spawned actor it can't be spawned again later when pressing the start button? Is there another way instead of deleting it completely?