Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Game with Sprite Kit Particle Systems and Keeping Score Game Over Animation

Bradley White
Bradley White
21,285 Points

Game Over won't animate

As always, I've watched the video multiple times and looked at my code multiple times. The game over node won't animate. At one point I altered the code somehow and got it to animate but it didn't have a correct position when animating. I coded a NSLog before and after the run block to add the touch to start label. The completion block is completely skipped based on the fact it logs before and after the block. I can't post the code at the moment but if anyone has a clue what's going on, fill me in. The run action is in the runSequence action along with the scaleUp and scaleDown actions.

1 Answer

Bradley White
Bradley White
21,285 Points

Found it!

After creating the gameOverLabel, I typed "gameOver.name =" instead of "gameOverLabel.name =" !!!

The compiler didn't through any errors because the gameOverNode gameOver is created in the same local scope before the label.

Why does it always happen that answer is found after posting here?!

Why play video games? Coding provides all the challenges the heart could desire! :-)