When the player takes his 8th hit, the last health point should also show an empty tile instead of a full tile before resetting the game.
The Score Var and other HUD stuff is sure Buggy
- Imagaryboy
- Posts: 18
- Joined: Mon Aug 20, 2018 9:05 am
- Location: Cologne
Re: The Score Var and other HUD stuff is sure Buggy
Re: The Score Var and other HUD stuff is sure Buggy
Oh that always has been like that (cf all Joe's videos).
When the player takes his last (8th) hits, it directly resets the game.
But you could try (at line 6):
When the player takes his last (8th) hits, it directly resets the game.
But you could try (at line 6):
Code: Select all
TXA
STA tempx
TYA
STA tempy
;; UDPDATE the health HUD a last time before die :
LDA #$00
STA hudElementTilesToLoad
STA hudElementTilesMax
LDA DrawHudBytes
ora #HUD_myHealth
STA DrawHudBytes
;; TURN ON handling the hud
;;;;;;;;;;;;;;;;;;;
LDX player1_object
LDA Object_x_hi,x
STA temp
LDA Object_y_hi,x
STA temp1
CreateObject temp, temp1, #$08, #$00
;; need to do this redundantly, otherwise, the death object will be in same slot as player
LDX player1_object
DeactivateCurrentObject
;;;;;;;;;;;;;;;;;;;
;;StopSound ;;<<-- don't want the music stop after the player dies
LDA #$FF
STA player1_object
;; HERE: when player dies, we give back his HEALTH :
LDA #$08
STA myHealth
LDX tempx
LDY tempy
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE
Re: The Score Var and other HUD stuff is sure Buggy
All the code referencing myMoney is in Routines\UserScripts\AdventureGame_Base\PowerUpCode\
My advice to anyone looking to work with code is to get Notepad++ (or even better if you can afford it, Sublime Text 3) because you can find in files in folder to find all the references to a thing.
Also worth noting in the modules a lot of script is loaded whether you use those items or not -- in the Project Settings -> Script Settings tab you should set any tile types or power ups you're not using to their Blank equivalents in the same folder (i.e. "ROUTINES\UserScripts\AdventureGame_Base\PowerUpCode\Powerup_Blank.asm").
My advice to anyone looking to work with code is to get Notepad++ (or even better if you can afford it, Sublime Text 3) because you can find in files in folder to find all the references to a thing.
Also worth noting in the modules a lot of script is loaded whether you use those items or not -- in the Project Settings -> Script Settings tab you should set any tile types or power ups you're not using to their Blank equivalents in the same folder (i.e. "ROUTINES\UserScripts\AdventureGame_Base\PowerUpCode\Powerup_Blank.asm").
ASM/C# Coder -- Computer + Coffee = Code
ASM Tutorial Series
ASM Tutorial Series
- Imagaryboy
- Posts: 18
- Joined: Mon Aug 20, 2018 9:05 am
- Location: Cologne
Re: The Score Var and other HUD stuff is sure Buggy
Thanks again! it worked but I had to drop some other code because I ran out of space xDdale_coop wrote: ↑Thu Sep 13, 2018 11:56 amOh that always has been like that (cf all Joe's videos).
When the player takes his last (8th) hits, it directly resets the game.
But you could try (at line 6):Code: Select all
TXA STA tempx TYA STA tempy ;; UDPDATE the health HUD a last time before die : LDA #$00 STA hudElementTilesToLoad STA hudElementTilesMax LDA DrawHudBytes ora #HUD_myHealth STA DrawHudBytes ;; TURN ON handling the hud ;;;;;;;;;;;;;;;;;;; LDX player1_object LDA Object_x_hi,x STA temp LDA Object_y_hi,x STA temp1 CreateObject temp, temp1, #$08, #$00 ;; need to do this redundantly, otherwise, the death object will be in same slot as player LDX player1_object DeactivateCurrentObject ;;;;;;;;;;;;;;;;;;; ;;StopSound ;;<<-- don't want the music stop after the player dies LDA #$FF STA player1_object ;; HERE: when player dies, we give back his HEALTH : LDA #$08 STA myHealth LDX tempx LDY tempy
Re: The Score Var and other HUD stuff is sure Buggy
Arf... yeah, a recurring problem.
Hopefully, in the 4.1 we will have a lot more free space
Hopefully, in the 4.1 we will have a lot more free space

-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE