Barry2
Member
This is my first time being able to really contribute code to the forums, I been working on how to hid the HUD on my start screen. This is the code that has worked for me.
In your script settings, under Handle drawing sprite HUD, copy code and it should work for Metrovania
LDA gameState ;; CHECK GAMESTATES ;;
CMP #$00 ;; "Start Screen" game state ;;
BEQ onStartScreen ;; IS START SCREEN ;;
JMP skipAll
onStartScreen:
DrawSpriteHud #16, #16, #$78, #$03, #$76, myHealth, #%00000001 ;;;; this draws lives
DrawSpriteHud #16, #24, #$79, #$05, #$77, myAmmo, #%00000000 ;; this draws ammo
skipAll:
;;; Here is an example of how to do a sprite hud.
;;; Arg5, the one that has the value of myVar, must correspond to a user variable you have in your game.
;;; Don't forget, you can only draw 8 sprites per scanline, so a sprite hud can only be 8 sprites wide max.
;;;;;;; Check CMP for correct screen. Mine is #$00. Some could be #$01
In your script settings, under Handle drawing sprite HUD, copy code and it should work for Metrovania
LDA gameState ;; CHECK GAMESTATES ;;
CMP #$00 ;; "Start Screen" game state ;;
BEQ onStartScreen ;; IS START SCREEN ;;
JMP skipAll
onStartScreen:
DrawSpriteHud #16, #16, #$78, #$03, #$76, myHealth, #%00000001 ;;;; this draws lives
DrawSpriteHud #16, #24, #$79, #$05, #$77, myAmmo, #%00000000 ;; this draws ammo
skipAll:
;;; Here is an example of how to do a sprite hud.
;;; Arg5, the one that has the value of myVar, must correspond to a user variable you have in your game.
;;; Don't forget, you can only draw 8 sprites per scanline, so a sprite hud can only be 8 sprites wide max.
;;;;;;; Check CMP for correct screen. Mine is #$00. Some could be #$01