offparkway
Active member
Would like my player to either show a hurt animation or reset in the same screen when hit by an enemy, and only reset to beginning when lives get to 0.
;; chekpoint tile
LDA Object_x_hi,x
STA continueX
LDA Object_y_hi,x
STA continueY
LDA warpMap
STA continueMap
LDA currentNametable
STA continueScreen
dale_coop said:Yeah, if you followed all the tutorial videos...
now, just make checkpoint type tiles (checkpoint.asm), your player touches the checkpoint, he will respawn from that place after dying...
Here's the code:
Code:;; chekpoint tile LDA Object_x_hi,x STA continueX LDA Object_y_hi,x STA continueY LDA warpMap STA continueMap LDA currentNametable STA continueScreen
Assign to a new tile type (like Joe explained to do with the "spikes" tiles, for example).
And place it at the beginning of your screen (level), usually at the same spot where your player is warped in (spawn)..