Spawned Actors not destroying? Anyone else had this?
HappyKat78
Member, BASIC Posts: 173
Hi Guys,
I've got some actors that get destroyed when global attribute "SoftReset" is true (yes, I'm doing a manual reset of some of the actors on the scene as I don't want to reset the whole scene). I then have a control actor on the scene that also knows to respawn the actors based on their initial X and Y coordinates after the actors have been destroyed. There is a reset button (actor) on the scene that is pressed to trigger this.
The first time the reset button is pressed it all works perfectly - Actors are destroyed and replaced with new actors in their original positions. However, every time after the reset button is pressed, the newly respawned actors don't get destroyed, but the control actor still respawns new actors. I'm not sure why the first time the original actors get correctly destroyed, but the newly respawned actors ignore the destroy command. For reference, the actors to be destroyed have not had their instances edited, all of the code is in the prototype.
Has anyone else come across this and have a solution for it?
Many thanks,
HK
I've got some actors that get destroyed when global attribute "SoftReset" is true (yes, I'm doing a manual reset of some of the actors on the scene as I don't want to reset the whole scene). I then have a control actor on the scene that also knows to respawn the actors based on their initial X and Y coordinates after the actors have been destroyed. There is a reset button (actor) on the scene that is pressed to trigger this.
The first time the reset button is pressed it all works perfectly - Actors are destroyed and replaced with new actors in their original positions. However, every time after the reset button is pressed, the newly respawned actors don't get destroyed, but the control actor still respawns new actors. I'm not sure why the first time the original actors get correctly destroyed, but the newly respawned actors ignore the destroy command. For reference, the actors to be destroyed have not had their instances edited, all of the code is in the prototype.
Has anyone else come across this and have a solution for it?
Many thanks,
HK
This discussion has been closed.
Comments
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User