hud doesnt update health instantly

Scottdanoob

New member
hey guys. just wondering if someone can help me with this issue real quick. when i get hit my health doesnt update on the hud part, until i enter the next screen. i still take damage so if i get hit a certain amount of times that i set the players health to ill die.
 

dale_coop

Moderator
Staff member
What module are you using?
Have you made some modifications in the xxx_HandlePlayerHurt.asm script?
Maybe a problem with you SFX_PLAYER_HURT sound... try to comment out the line
Code:
;;	PlaySound #SFX_PLAYER_HURT
 

Scottdanoob

New member
im using the old 4.0(so basic) i have the updated one but i didnt want to start over with the amount of work i did with the game and i havnt made any modifications to the hurt plaer script
 

dale_coop

Moderator
Staff member
Oh boy... you're motivated. You really should try to upgrade your project to the newer versions.

But, for the 4.0, you need to modify the HandleObjetCollision.asm script, around line 198 , the notPlayerDeath subroutine:
Code:
	STA Object_health,x
	STA myHealth
	
;	STA GLOBAL_Player1_Health
	;;; we also need to set up the routine to update the HUD
	;; for this to work right, health must be a "blank-then-draw" type element.
	STA hudElementTilesToLoad
		LDA #$00
		STA hudElementTilesMax
		LDA DrawHudBytes
		ORA #HUD_myHealth
		STA DrawHudBytes

...maybe
 
Top Bottom