Bucket Mouse
Active member
To win my game you have to find and collect a certain number of items. I put the trigger for these items in the text box.....if you select the "Give Item" option in the menu, I threw out the code for it and made this instead:
This code also vanishes the sprite for the item, and triggers the screen so it doesn't appear again. "Wingamestuff" reads like this...
"winGame" jumps to the Win Game Tile code. As intended, it's supposed to go to the Win screen. Instead, it crashes the game with a glitch screen.
Keep in mind I can't go back on the "text box gives item" mechanic; not at this stage if I want to make PRGE. It has to work THIS way. What is going wrong?
One potential cause: the game is not undrawing the text box before attempting to warp. I don't know why; when it's adding to the HUD, it always waits until the text box finishes drawing before it performs that function.
Code:
AddValue #$01, myKeys, #$01, #$00
UpdateHud HUD_myKeys
LDX #$01
LDA Object_ID,x
DeactivateCurrentObject
JMP wingamestuff
This code also vanishes the sprite for the item, and triggers the screen so it doesn't appear again. "Wingamestuff" reads like this...
Code:
wingamestuff:
TriggerScreen screenType
LDA #$06
CMP myKeys
BEQ winactivated
JMP enditempart2
winactivated:
JMP winGame
"winGame" jumps to the Win Game Tile code. As intended, it's supposed to go to the Win screen. Instead, it crashes the game with a glitch screen.
Keep in mind I can't go back on the "text box gives item" mechanic; not at this stage if I want to make PRGE. It has to work THIS way. What is going wrong?
One potential cause: the game is not undrawing the text box before attempting to warp. I don't know why; when it's adding to the HUD, it always waits until the text box finishes drawing before it performs that function.