Help with Sprite Hud

strawmancomics

New member
I've tried following both Joe videos and @baardbi videos and I keep showing no sprite huds.

1710359756067.png

myHealth variable is commented out because when I run the program it says that the variable is already being used.

1710360270754.png

This is my doDrawSpriteHud_L2RPlatformer.asm
;;; 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.


;DrawSpriteHud #$08, #$08, #$11, #$10, #$10, myVar, #$00
; arg0 = starting position in pixels, x
; arg1 = starting position in pixels, y
; arg2 = sprite to draw, CONTAINER
; arg3 = MAX
; arg4 = sprite to draw, FILLED
; arg5 = variable.
; arg6 = attribute

DrawSpriteHud #16, #16, #$7e, myMaxHealth, #$7d, myHealth, #%00000011 ;;;; this draws health

DrawSpriteHud #16, #24, #$74, #$05, #$75, myAmmo, #$00 ;; this draws ammo
 
Top Bottom