Dev Individual
New member
So I want to make an extra life object for my game, and I tried to use some code from the maze game advanced tutorial. As seen below, this is what I put in:
HTML clipboard pickupLabel:
LDA Object_type,x
CMP #$04
BNE +notThisPickup
INC myLives
UpdateHudElement #$01
PlaySound #sfx_OneUp
+notThisPickup:
CMP #$01
BNE +notThisPickup
JMP RESET
+notThisPickup
+endPickups
For some reason, the "INC" isn't highlighted like "LDA", "CMP", "BNE" and "JMP". So whenever I touched my extra life object, it doesn't change the number of lives I have. Why might this be? Please let me know when you can, thank you.
HTML clipboard pickupLabel:
LDA Object_type,x
CMP #$04
BNE +notThisPickup
INC myLives
UpdateHudElement #$01
PlaySound #sfx_OneUp
+notThisPickup:
CMP #$01
BNE +notThisPickup
JMP RESET
+notThisPickup
+endPickups
For some reason, the "INC" isn't highlighted like "LDA", "CMP", "BNE" and "JMP". So whenever I touched my extra life object, it doesn't change the number of lives I have. Why might this be? Please let me know when you can, thank you.