baardbi
Well-known member
On my game over screen (screen 255) I have a game object (10) that looks like the player. I want him to go from state 0 to 1 when I press start. I have assigned the script to the start button, so that works. But the object does not change state.
Here's the code that triggers on my game over screen when I press start:
And some screenshots after the code.
PS! I have created the OBJ_P1_GAMEOVER constant.
Game object 10:
Actions game object 10:
Animations game object 10:
Here's the code that triggers on my game over screen when I press start:
And some screenshots after the code.
PS! I have created the OBJ_P1_GAMEOVER constant.
Code:
;; if on the GAME OVER screen
LDA currentScreen
CLC
CMP #GAME_OVER_SCREEN
BNE +
StopSound
;;CreateObject #$70, #$70, #$A, #$00, currentNametable
LDX #OBJ_P1_GAMEOVER ;;Game object nr 10 (with two animations)
ChangeObjectState #$01, #$00
PlaySound #SND_RESTARTGAME
;JMP RESET ;;Go to Start screen
+
RTS ;; skip the code
Game object 10:
Actions game object 10:
Animations game object 10: