JeffPack
New member
So my game has people you need to rescue. They are marked as a game object pickup. The idea is the var tiles hud element is supposed to decrease just like the health meter works.
Here is the code that the pickup runs:
But here is the result I get when the survivor is picked up
But when I transition over to a new screen everything is as it should be
Anyone have any ideas what I'm doing wrong here?
Here is the code that the pickup runs:
Code:
AddValue #$07, myScore, #$02, #$02
LDA #$01
STA hudElementTilesToLoad
LDA DrawHudBytes
ORA #HUD_myScore
STA DrawHudBytes
LDA mySurvivors
CLC
CMP #$00
BEQ noMoreSurvivors
removeSurvivor:
SEC
SBC #$01
STA mySurvivors
STA hudElementTilesToLoad
LDA #$00
STA hudElementTilesMax
LDA DrawHudBytes
ORA #HUD_mySurvivors
STA DrawHudBytes
noMoreSurvivors:
TriggerScreen screenType
PlaySound #SFX_GET_COIN
But here is the result I get when the survivor is picked up
But when I transition over to a new screen everything is as it should be
Anyone have any ideas what I'm doing wrong here?