Platformer Checkpoint

KoolDoob

Member
Hi guys!

I followed Dale's tutorial about checkpoint : https://nesmakers.com/viewtopic.php?f=23&t=1953&p=19933#p19933

I replaced the "PlyerLoseLife.asm" by following your advices but the "Export and Test" showed me an error (find it in the attachments).

Next, I removed the 6 first lines of the code. I can "Export and Test" but nothing happen when I died after activating the checkpoint.

Thanks for the help :)
 

Attachments

  • Export and Test issues because of the checkpoint.PNG
    Export and Test issues because of the checkpoint.PNG
    19.8 KB · Views: 528
  • Player Lose Life.PNG
    Player Lose Life.PNG
    27.6 KB · Views: 528

dale_coop

Moderator
Staff member
You need to add a myLives variable to your project (in "Project Settings > User variables") with a value of..."0" (for unlimited or "255" if you prefer). And it should work.
PS: another advice, don't remove block of code in the scripts, else it will not work as intended.... if you have error, it's just because there 's missing something (a constant/variable) in your project. Because all the modules don't have the same constants/variables declared by default.
 

KoolDoob

Member
Ok I'll never do this again!

So I replace the code and add a myLives variable but it says this :
 

Attachments

  • Export and test_2.PNG
    Export and test_2.PNG
    20.4 KB · Views: 512

dale_coop

Moderator
Staff member
Still the same error.. have you added a "myLives" variable in "Project Settings > User variables"?
 

KoolDoob

Member
Oww ok it works (I didn't "ativate" the myLives variable).

But now, an other problem sorry.. I get the checkpoint but when I die, nothing happen, there is no reset at the checkpoint. Maybe I have something wrong in "HandleDeath" or any other thing ?
 

dale_coop

Moderator
Staff member
When you say, nothing happen... if is your player dead? I mean he's destroyed, and you see your death animation?
Have you set correctly the death animation object? Have you set it to "Restart Game" on the end of animation? (and set an animation speed)
 

KoolDoob

Member
Ok that's was my mistake..! It works now, i forgot to check "Restart Game". I have to be more attentive !!

Merci infiniment :)
 
Top Bottom