baardbi
Well-known member
This is a weird one. The pickup objects in HandleDrops.asm are not being created, but the CreateObject for monster death works fine. I also want another object to be created when a boss is defeated, but that object isn't created either. The code works, in the sense that it jumps to the right place. I know that since the music stops playing (it's supposed to do that). I was wondering if this has anything to do with object slots or something like that (not enough free slots or something...).
Here's my HandleDrops.asm code:
Here are my game objects:
Here are my user variables:
And here are my user constants:
Here's my HandleDrops.asm code:
Code:
;;; monster objects drop at random.
LDA otherCenterX
SBC #$08
STA temp
LDA otherCenterY
SBC #$08
STA temp1
LDA Object_scroll,x
SBC #$00
STA temp3
;; if on the BOXEY PETE screen
LDA currentScreen
CLC
CMP #BOXEY_PETE_SCREEN
BNE notBoss
boxeyPeteDropsClue:
;; Boxey Pete is defeated and drops a clue.
StopSound
LDA #$01
STA ignoreControls
CreateObject temp, temp1, #BOSS_DROPS_CLUE, #$00, temp3
JMP donePickup
notBoss:
;JSR GetRandomNumber
LDA #$00 ; <- **************** Bårds dirty hack :) :) :) ******************
;AND #%00000011 ;; now, we have a number between 0 and 3
BNE pickup1 ;;
pickup0:
;;; Pickup 0: Here, we'll create health
CreateObject temp, temp1, #HEALTH_PICKUP, #$00, temp3
JMP donePickup
pickup1:
CMP #$01
BNE pickup2
;;; Pickup1: Here, we'll create nothing :)
JMP donePickup
pickup2:
CMP #$02
BNE pickup3
;;; Pickup1: Here, we'll create nothing :)
JMP donePickup
pickup3:
;;; Pickup1: Here, we'll create nothing :)
JMP donePickup
;;;; do the same for each case.
;;;; blank cases will simply return 'nothing'.
donePickup:
;;; ALL cases create a "pow"
CreateObject temp, temp1, #OBJ_MONSTER_DEATH, #$00, temp3
Here are my game objects:
Here are my user variables:
And here are my user constants: