chronicleroflegends
Member
Working on a boss, and I have made it out of an enemy object for it's weakpoint and background tiles for the rest of its body.
When it dies, I want to hide all of the background tiles making up the boss, not just its weakpoint by destroying the enemy.
This is the code I made to try and do this:
It runs, destroys the boss, and triggers the screen, but it doesn't change any tiles.
Note that I have set all the bosses graphics to tileaction 15. The script for 15 is empty, the same as Null-walkable. Its just so that the boss graphics have their own collision type.
When it dies, I want to hide all of the background tiles making up the boss, not just its weakpoint by destroying the enemy.
This is the code I made to try and do this:
Code:
bossKill:
;; Kill the boss, trigger the screen, and load any changed tiles
;; Destroy the boss
LDA Object_x_hi,x
STA temp
LDA Object_y_hi,x
STA temp1
DeactivateCurrentObject
CreateObject temp, temp1, #OBJ_MONSTER_DEATH, #$00, currentNametable
PlaySound #SND_SPLAT
;; Add to the player's score
;; Get rid of the bosses background graphics
ChangeAllTiles #$15, #$00, #$00 , #$00
ChangeAllTiles #$15, #$00, #$00 , #$01
;; Trigger the screen
TriggerScreen screenType
JSR bossScreenTriggered
RTS
It runs, destroys the boss, and triggers the screen, but it doesn't change any tiles.
Note that I have set all the bosses graphics to tileaction 15. The script for 15 is empty, the same as Null-walkable. Its just so that the boss graphics have their own collision type.