Group Group Group Group Group Group Group Group Group

SpriteKit is Registering Multiple Contacts

#1

Any help would be greatly appreciated. I am relatively new to this and just feel like I beginning to understand coding.

My issue -----

I am having difficult trying to fix a problem with a SpriteKit tutorial that I have been enhancing as a way to hone and improve my skills as a newbie.

I am experiencing multiple contacts when my player “crashes” on the ground.

  • More than one life is removed, which causes my game to generate a 'Attemped to add a SKNode which already has a parent: ’ error adding the player back to the scene.

I have tried player.removeFromParent everywhere I can think of inside my code.

The game works flawlessly as long as I “crash” into “enemies” in the air. Once the player contacts the ground, it’s all over. If I “kill” the player upon contact with the ground, there is no issue, but I want the game to continue as long as the player still has lives whether the contact the ground or and enemy.

I really believe the issue would be fixed if the multiple contact problem could be resolved.

opened #3