Francois Brodeur
Member
Hello, I can get the box to show but there is no text inside.
The code is in a pickup, I am trying to show text when the pickup is collected.
Here is a video of what is happening,
View: https://www.youtube.com/watch?v=vmZqDTDBs7M
And here is the code of the pickup.
LDA Object_type,x
CMP #$08 ; #$08 is Energy Tank
BNE +notThisPickup
LDA myMaxHealth
CLC
ADC #4
STA myMaxHealth
STA myHealth
LDA #$00
STA npc_text
TriggerScreen screenType
JMP endPickups
+notThisPickup
CMP #$07 ; #$07 is Plasma Tank
BNE +notThisPickup2
LDA myMaxAmmo
CLC
ADC #10
STA myMaxAmmo
STA myAmmo
LDA #$01
STA npc_text
TriggerScreen screenType
JMP endPickups
+notThisPickup2
endPickups:
DrawBox #BOX_1_ORIGIN_X, #BOX_1_ORIGIN_Y, #BOX_1_WIDTH, #BOX_1_HEIGHT, #TEXT_NPC, npc_text
The code is in a pickup, I am trying to show text when the pickup is collected.
Here is a video of what is happening,
And here is the code of the pickup.
LDA Object_type,x
CMP #$08 ; #$08 is Energy Tank
BNE +notThisPickup
LDA myMaxHealth
CLC
ADC #4
STA myMaxHealth
STA myHealth
LDA #$00
STA npc_text
TriggerScreen screenType
JMP endPickups
+notThisPickup
CMP #$07 ; #$07 is Plasma Tank
BNE +notThisPickup2
LDA myMaxAmmo
CLC
ADC #10
STA myMaxAmmo
STA myAmmo
LDA #$01
STA npc_text
TriggerScreen screenType
JMP endPickups
+notThisPickup2
endPickups:
DrawBox #BOX_1_ORIGIN_X, #BOX_1_ORIGIN_Y, #BOX_1_WIDTH, #BOX_1_HEIGHT, #TEXT_NPC, npc_text