tbizzle
Well-known member
I used this method to stop my player from forever recoiling after taking damage from monsters in the Adventure Module. If your project can benefit from it, then awesome! It seems to work for me pretty well.
So in your "Subroutines\doHandlePhysics_AdventureBase.asm" right after this bit of code at around line 495:
Insert this new code underneath it:
Now to enter it two more times. The second time right after this bit of code at around line 523:
Insert this bit of code underneath the above code:
And then again underneath this bit of code at around line 688:
Insert this bit of code:
Another tutorial that works great long with this is tutorial for adding an "invincibility timer".
So in your "Subroutines\doHandlePhysics_AdventureBase.asm" right after this bit of code at around line 495:
Code:
LDA directionByte
ORA #%10000000
AND #%10111111 ;; "left"
STA directionByte
Insert this new code underneath it:
Code:
CPX player1_object
BNE +continueP
StopMoving temp, #$FF, #$00
+continueP:
Now to enter it two more times. The second time right after this bit of code at around line 523:
Code:
LDA directionByte
ORA #%11000000 ;; "right"
STA directionByte
Insert this bit of code underneath the above code:
Code:
CPX player1_object
BNE +continueP
StopMoving temp, #$FF, #$00
+continueP:
And then again underneath this bit of code at around line 688:
Code:
JSR doHandleBounds
JMP skipPhysics
doneWithH:
Insert this bit of code:
Code:
CPX player1_object
BNE +continueP
StopMoving temp, #$FF, #$00
continueP:
Another tutorial that works great long with this is tutorial for adding an "invincibility timer".
Adding Invincibility Frames to 4.5.9
Does anybody have a good technique to add an invincibility timer to the game? I want the player to be invincible for several seconds after respawning. Once again, this was easier in the old version of NESMaker. The solution I'm thinking about right now would be to create a variable that counts...
www.nesmakers.com