Customizing Player Hurt Invincibility/Recoil

I have made User Constants that I want to use to control the players blinking timer, invincibility timer, and recoil force when damaged.

I found where it loads the blinking timer and have that working, but I am having trouble finding where it sets invincibility and recoil force.

Invincibility I cannot find anywhere, and recoil force is in a subroutine called 'DetermineRecoilDirection' but I cannot find where that subroutine is defined in the scripts.

I want to replace the default constants with my own so that I have more control over them. Does anybody know where I can find these?
 

Mugi

Member
DetermineRecoilDirection is located at the end of HandleObjectCollisions.asm

the values for hurt are located in gamedata/constants.asm

;;//////////////////////////////
;OBJECT TIMERS
HURT_TIMER = #$0A
INVINCIBILITY_TIMER = #$32
RECOIL_SPEED_HI = #$06
RECOIL_SPEED_LO = #$0A

HURT_STATUS_MASK = #%00000011
;; seperate player / monster hurt timers?
 

Mugi

Member
search for HandleObjectTimers: in handleupdateobjects.asm
for me it's line 544 but if you poked the file, the line number might vary
 
Top Bottom