Open PartTimeCode opened 4 years ago
@PartTimeCode could you show the changes made to "PlayerData.gd"? I see you put the change to the %s for game interface score but I am not sure exactly how I am supposed to code the function for level_score so that it actually only takes the totals from that specific scene.
Not sure if this has been addressed but I notice in my game after completing a couple of levels and I die and retry, all score is lost from previous levels, I fixed this by adding another variable to PlayerData "level_score" with a setget and make ememys and coins add there score to this, then I add the level score to the total score in the portal and make the user interface add the scores for display "score.text = "Score: %s" % str(PlayerData.score+PlayerData.level_score)"
now when I die I only lose the score for that level.
Fantastic tutorial BTW