Switching scenes causes spawned actors to disappear
So I'm finally getting around to creating a game that uses a scene more than once. In my initial scene, I spawn an actor multiple times that then checks for certain conditions and displays text as needed. I have another actor that switches to a text input scene and then back to the initial scene. When that happens and it goes back to the initial scene, the spawned actors are missing. I can tell because (a) my every 1 second --> log debugging statements stop appearing in the log window and (b) my alpha=1 actors no longer appear on the scene.
What's causing this? Do I need to respawn the actors whenever I switch to a scene I've already run? How do I do this without having too many copies of each actor.
In case it's not clear, here's an example: "control" actor spawns four copies of "check answer" actor and then destroys itself. An "input" actor switches to a different scene and then switches back to the initial scene, where the "check answer" actors are no longer there. Even if I turn off the destroy behavior, the "check answer" actors do not get respawned. That last part might be a rule error on my part, but I'm not sure that's the issue.
What's causing this? Do I need to respawn the actors whenever I switch to a scene I've already run? How do I do this without having too many copies of each actor.
In case it's not clear, here's an example: "control" actor spawns four copies of "check answer" actor and then destroys itself. An "input" actor switches to a different scene and then switches back to the initial scene, where the "check answer" actors are no longer there. Even if I turn off the destroy behavior, the "check answer" actors do not get respawned. That last part might be a rule error on my part, but I'm not sure that's the issue.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Comments
for four checkAnswer actors … think it might be easier to move them on/off screen
@};- MH
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User