[4.5.6] Action Steps won't cycle

So I've discovered action steps won't cyle past step 2 if you use doHandlePhysics_PlatformBase.asm (doHandlePhysics_ArcadePlatformBase.asm works).

Arcade Platformer Module - have a player and bullet (01 object), give several action steps to bullet, player spawns bullet and all bullet steps cycle. Do the same in LR_Platformer or MetroidVania and it'll only do first 2 steps. I tried telling step 01 to skip to last step, which works but even if object has no speed settings it'll move.

Narrowed it down to this part of code

Code:
    isSolidSoLand:
	;; move to position
	;;; load the top of the tile that is being run into.
    	;;check if in a jumping state.
    TXA
    STA temp
    GetActionStep temp
    CMP #$02 ;; presums jump is in state 2
    BNE +dontChangeToIdle
        LDA gamepad
        AND #%11110000
        BNE +isRunningWhenLanding
            ;; is idle when landing
            LDA #$00
            STA temp1
            JMP +gotLandingState
        +isRunningWhenLanding
            LDA #$01
            STA temp1
        +gotLandingState
            ChangeActionStep temp, temp1 ;; changes to either idle or running depending on if a direction key is pressed.
    +dontChangeToIdle

Currently figuring out how to make this only apply to the player object.


UPDATE - current workaround is make my jump state 6
 

Subotai

Active member
For my case, it is only for the action steps for monster and NPC (ArcadePlatformer Modules) that doesn't work as expected.
NPC and monster are looping from step 0 and 1, never go to 2 (even if I have the "advance" in End/Action or End Animation.

My fix is to add a compare before thoses lines to make sure that is the player :

Code:
isSolidSoLand:
    ;; move to position
    ;;; load the top of the tile that is being run into.
    ;;check if in a jumping state.
    CPX player1_object
    BNE +dontChangeToIdle
    TXA
    STA temp
    ...
 
Top Bottom