Destroyed Actors Won't Reset After Scene Change

dumbgamesdumbgames Member, PRO Posts: 4

Hi there,

I have a fairly standard endless runner game with predesigned levels. As I thought it was good practice to do so I have a rule in the platforms the character jumps that causes them to be destroyed when they leave the screen on the left hand side. When the character dies I change scene to a 'You Died' screen with a score and a button to Try Again. The Try Again button triggers a Change Scene back to the Game Scene to start again but all the platform actors that auto destroyed the first time around are still gone so the Player Character just falls to his death straight away. I Know a Change Scene behaviour doesn't reset attributes but I thought it would reset the Actors in the scene! Can anyone help?

Thanks!

Comments

  • dumbgamesdumbgames Member, PRO Posts: 4

    Just to add to this I have tried just triggering a straight Reset Scene when the Player dies instead of going to the You Died scene and the same problem persists. So neither Reset Scene nor Change Scene are actually resetting the scene's destroyed actors as they are meant to do according to Gamesalad's own literature!?

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Do you have any game level attributes controling the platforms? Reset scene does not affect game level info. You would need to do a reset game.

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    Is there an attribute that will cause the platforms to destroy? If so, make sure to change that attribute back to it's original state before resetting the scene. Resetting the scene does not change any game attributes.

    Mental Donkey Games
    Website - Facebook - Twitter

  • dumbgamesdumbgames Member, PRO Posts: 4

    Thanks guys. You know what...

    I thought it wasn't that as I know that Game Level attributes don't reset but actually I had set it up so that the platforms destroy when their X position was less than the Player X position minus the Screen Width. As the player starts again at the beginning of the scene after dying each time I thought this would be fine but I forgot that I actually had to create a game level attribute for Player Position X which was being populated by a constrain attribute from within the Player actor. This was the only way to have the platforms reference the Player Position X value. So whilst the Player begins at the start of each level just fine, the game level attribute for Player Position X had not reset and so instantly destroyed all the platforms up to the point at which the player died!

    I had SUCH a frustrating morning trying to figure it out. Went off for lunch in a mood and then came back to your replies and fixed it in 30 seconds! THANK YOU! :smile: :smile:

Sign In or Register to comment.