4.5.9 Mega-Metroidvania MOD: Prize tile pickups instantly disappear?

vanderblade

Active member
Quick question for the hivemind:

I'm using 4.5.9 with a Mega-Metroidvania MOD base.

When I break a prize block, it changes to another tile appropriately and the correct game object pickup appears for a brief second -- but then disappears.

The pickup shouldn't destroy itself for any reason, and I'm stumped. I use the exact same method in my other games and it works fine, so I think it has something to do with the Metroidvania MOD.

Any ideas?
 

Jonny

Well-known member
I've just tried out the prize_PlatformBase one and I can't get that same issue to happen.

Or... is this the SMB style one where you hit it from underneath?? If so, I'm actually looking for that script if you can help.

EDIT: Sorry, I think I've found it now.... is it stopOnSolid_PlatformBase_L2R_prize.asm you're using for AI reaction?
 
Last edited:

vanderblade

Active member
I've just tried out the prize_PlatformBase one and I can't get that same issue to happen.

Or... is this the SMB style one where you hit it from underneath?? If so, I'm actually looking for that script if you can help.

EDIT: Sorry, I think I've found it now.... is it stopOnSolid_PlatformBase_L2R_prize.asm you're using for AI reaction?
Hey Jonny. Unlike the prize platform base, I'm not trying to change a value. I'm trying to create a pickup object. It creates but then disappears just as fast. I'm using the below code:
(I have the random number stuff commented out just to test the object creation at the moment.)

Code:
;;; prize tile

LDA ObjectUpdateByte
ORA #%00000001
STA ObjectUpdateByte ;; makes solid

    LDA updateScreenData
    AND #%00000100
    BEQ +doScript
        RTS
    +doScript
    LDA scrollOffsetCounter
    BEQ +doIt
        RTS
    +doIt   
LDA Object_type,x
CMP #$01
BEQ +isPlayerWeapon ;; is it the player weapon? If not, skip. If so, continue on.
    JMP +notPlayerWeapon
    +isPlayerWeapon
    

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; BELOW WILL CHANGE TILE AT COLLISION.
    PlaySound #sfx_explosion
    ChangeTileAtCollision #$44, #$00
    
    ;MY_PRIZE = #$01 ;; change this to the type of object you want a prize block to create.
    ;MY_PRIZE_STATE = #$00 ;; change this to the state of the prize when it appears.
    ;MY_PRIZE_Y_OFFSET = #$00 ;; change this to how far above the prize box it should create this object.
    ;MY_PRIZE_X_OFFSET = #$01 ;; change this to how far to the right of the left side of the tile it should create this object.
    
    ;JSR doGetRandomNumber
    ;AND #%00001111 ;; now, we have a number between 0 and 15 ;; these are binary numbers
    ;BNE +notProjectileDrop
    
        LDA tileX
        AND #%11110000
        CLC
        ADC #$04
        STA tempA
        LDA tileY
        AND #%11110000
        SBC #$10
        STA tempB
        LDA Object_screen,x
        STA tempC
        ;TXA
        ;PHA
        ;CreateObject tempA, tempB, #$04, #$00, tempC
        CreateObjectOnScreen tempA, tempB, #$04, #$00, tempC
        JMP +notPlayerWeapon
    
    +notProjectileDrop
    JSR doGetRandomNumber
    AND #%00000111 ;; now, we have a number between 0 and 7
    BNE +notProjectileDrop2
    
    LDA tileX
        AND #%11110000
        CLC
        ;ADC #$04
        STA tempA
        LDA tileY
        AND #%11110000
        ;SBC #$08
        STA tempB
        ;LDA Object_screen,x
        ;STA tempC
        ;TXA
        ;PHA
        CreateObject tempA, tempB, #$04, #$00, currentNametable
        JMP +notPlayerWeapon
    
    +notProjectileDrop2
    LDA tileX
    AND #%11110000
    CLC
    ;ADC #$04
    STA tempA
    LDA tileY
    AND #%11110000
    ;SBC #$08
    STA tempB
    ;LDA Object_screen,x
    ;STA tempC
    ;TXA
    ;PHA
    CreateObject tempA, tempB, #$04, #$00, currentNametable

        
    +notPlayerWeapon

I'm using the Metroidvania mod.
 
Top Bottom