Walking in Place When Landing (Platformer / MetroVania) 4.5.9

baardbi

Well-known member
If you hold up or down on the D-pad when landing in a platform game the player will walk in place when landing.

walk.gif

To fix this you need to edit the physics script.

1. Go to Project Settins - Script Settings

2. Scroll all the way to the bottom till you see SubRoutines

3. The physics script is the first one under SubRoutines. Select it and click Edit

4. On line 659 you will see this:

LDA gamepad
AND #%11110000

Change it to this:

LDA gamepad
AND #%11000000

5. Save the file and you're done.
 
The metroidvania I have found another issues. When I stand in place on press the input to shoot a projectile, the projectile won't move until I press a direction.

Will this be a input script issue ? Currently using the original non modified script for projectiles in 4.5.9
 

baardbi

Well-known member
The metroidvania I have found another issues. When I stand in place on press the input to shoot a projectile, the projectile won't move until I press a direction.

Will this be a input script issue ? Currently using the original non modified script for projectiles in 4.5.9
To fix that you need to edit the Initialization script. In Project Settings - Script Settings scroll down to where it says Game. Edit the first file under there (Initialize). Go to line 70. It says STA Object_screen,x. Put the following code below that line and save the file.

LDA #FACE_RIGHT
STA Object_direction,x
 
To fix that you need to edit the Initialization script. In Project Settings - Script Settings scroll down to where it says Game. Edit the first file under there (Initialize). Go to line 70. It says STA Object_screen,x. Put the following code below that line and save the file.
Worked like charm! Thank you.
 
Thank you!!
This has really been annoying me for such a long time!

I am using Knietfeld's physicscript with slopes, but knowing what to look for i could fix the problem.
(for me it was at line 1126)

Code:
;kn- I think this is the end of my additions/changes to this script
    ;; 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 ;; presumes jump is in state 2
    BNE +dontChangeToIdle
        LDA gamepad
        AND #%11000000      ;;;;;;;;;;;;this line used to be #%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
 

Cadet N

New member
Awesome fix! Would you happen to know how to fix the issue that if you hold any corner direction (left/right + down/up), the sprite will still walk in place as well?
 

baardbi

Well-known member
Awesome fix! Would you happen to know how to fix the issue that if you hold any corner direction (left/right + down/up), the sprite will still walk in place as well?
I have tested it. It happens when you use the default NESmaker input setup. Pressing in a direction changes the action step but holding a direction moves the player. So when down is pressed on the D-pad and you press a direction the player will change to the walking state but will not start moving in that direction. I have some simplified input scripts that I use instead of the default NESmaker ones. I'll post a tutorial about that.
 

baardbi

Well-known member
Awesome fix! Would you happen to know how to fix the issue that if you hold any corner direction (left/right + down/up), the sprite will still walk in place as well?
I just posted a tutorial about this. It fixes your problem and also a few other annoying issues.

 
Top Bottom