Character Dies but sometimes not resetting scene.

When my main character dies, I have game.characterstate integer change to 6. The following will fire:
When game.characterstate is 6, change game.speed to 0.
When game.speed is 0, after 1 second, change game.characterstate to 0 (this is where the character is in the middle of the screen waiting for you to tap to start ala Flappy Bird), reset scene.

This will work 90% of the time but eventually I will have the game.characterstate stuck on 6
The main character has a rule in him to fire off the coding after that. Any thoughts on why it only works 90% of the time?

Comments

  • motorcycle boymotorcycle boy Member Posts: 429

    It occurred to me that I could take that section of code out of my main character and put it in a controller off screen. Seems to have fixed the issue. The main character had a lot of code firing off before that specific coding so it looks like there was a misfire every once in a while.

Sign In or Register to comment.