Hey All,
I have been playing around with NES maker for a few weeks now and seem to be getting the hang of it thanks in large part to lurking on the forums.
That being said, I have run into a problem with creating a recoil for my Brawler game. Currently, the player doesn't recoil from monsters and when hitting "hurt" blocks the player is instead thrown across the screen in their walking direction. In both cases the player enters the hurt animation correctly. I figured out fairly quickly that code for these two types of hurt were in different locations (tiles and common scripts) and have entered the same code in the relevant sections of each.
Thanks for all your help,
Brendan
I have been playing around with NES maker for a few weeks now and seem to be getting the hang of it thanks in large part to lurking on the forums.
That being said, I have run into a problem with creating a recoil for my Brawler game. Currently, the player doesn't recoil from monsters and when hitting "hurt" blocks the player is instead thrown across the screen in their walking direction. In both cases the player enters the hurt animation correctly. I figured out fairly quickly that code for these two types of hurt were in different locations (tiles and common scripts) and have entered the same code in the relevant sections of each.
I've played around with this a little - but my limited knowledge of asm is showing.ChangeActionStep player1_object, #$07
;; recoil
LDA #$00
STA Object_h_speed_hi,x
STA Object_h_speed_lo,x
STA Object_v_speed_hi,x
STA Object_v_speed_lo,x
LDA xPrev
STA Object_x_hi,x
LDA yPrev
STA Object_y_hi,x
+notAlreadyInHurtState
Thanks for all your help,
Brendan