[4.5] Can't move player UpRight/UpLeft

m8si
Posts: 10
Joined: Fri Jun 26, 2020 6:58 pm

[4.5] Can't move player UpRight/UpLeft

Post by m8si » Mon Jun 29, 2020 11:22 pm

This should be simple but I am not able to figure out what is wrong.

The first time script works fine. When I press UpRight/UpLeft the player moves correctly. But after I press DownRight/DownLeft player keeps moving DownRight/DownLeft even though I press UpRight/UpLeft.

Code: Select all

  TXA
    STA temp ;; assumes the object we want to move is in x.

    StartMoving temp, #UPRIGHT
     
 
    RTS

Code: Select all

 TXA
    STA temp ;; assumes the object we want to move is in x.

    StartMoving temp, #DOWNRIGHT
      

    RTS
etc...
User avatar
dale_coop
Posts: 5365
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: [4.5] Can't move player UpRight/UpLeft

Post by dale_coop » Tue Jun 30, 2020 10:07 am

Those scripts look corrects.
Could you share a screenshot of your Input Editor?
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
m8si
Posts: 10
Joined: Fri Jun 26, 2020 6:58 pm

Re: [4.5] Can't move player UpRight/UpLeft

Post by m8si » Tue Jun 30, 2020 2:13 pm

I can't post screenshot right now. I have those scripts attached to up and down presses. On hold button. I even tested it on fresh version of nesmaker to make sure I haven't broke any scripts.

On fresh install I made new project using 4.5 template that comes with it. Then I made a playerobject and just added those scripts to input scripts and attached them to keypresses. Did I miss something?
User avatar
dale_coop
Posts: 5365
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: [4.5] Can't move player UpRight/UpLeft

Post by dale_coop » Tue Jun 30, 2020 2:49 pm

No, it should be correct... but sometimes, small mistakes in the input editor.
If it's just that, I can check quickly...
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
User avatar
dale_coop
Posts: 5365
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: [4.5] Can't move player UpRight/UpLeft

Post by dale_coop » Tue Jun 30, 2020 2:50 pm

Here's my UPRIGHT:

Code: Select all

    TXA
    STA temp ;; assumes the object we want to move is in x.

        StartMoving temp, #UPRIGHT
        TXA
        STA temp ;; assumes the object we want to move is in x.
        ChangeFacingDirection temp, #FACE_UPRIGHT

    RTS
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
m8si
Posts: 10
Joined: Fri Jun 26, 2020 6:58 pm

Re: [4.5] Can't move player UpRight/UpLeft

Post by m8si » Tue Jun 30, 2020 3:23 pm

Strange. Is your code working properly also after downright movement has occured?
m8si
Posts: 10
Joined: Fri Jun 26, 2020 6:58 pm

Re: [4.5] Can't move player UpRight/UpLeft

Post by m8si » Tue Jun 30, 2020 3:31 pm

Is changeFacingDirection required? I cut it out because there is no need to change animation ay my case. But maybe it affects to movement also. I have to test it later
m8si
Posts: 10
Joined: Fri Jun 26, 2020 6:58 pm

Re: [4.5] Can't move player UpRight/UpLeft

Post by m8si » Tue Jun 30, 2020 6:29 pm

Tested with ChangeFacingDirection and it ain't working :/
User avatar
dale_coop
Posts: 5365
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: [4.5] Can't move player UpRight/UpLeft

Post by dale_coop » Wed Jul 01, 2020 7:08 am

Yeah. All my diagonal movements work fine.
Could you share a screenshot of your Input Editor? I can check that the issue is not from here.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
My son's game: KUBO 3
m8si
Posts: 10
Joined: Fri Jun 26, 2020 6:58 pm

Re: [4.5] Can't move player UpRight/UpLeft

Post by m8si » Wed Jul 01, 2020 8:08 pm

Here is a screenshot
screen.png
screen.png (74.54 KiB) Viewed 23 times
And here is what happens
ezgif.com-crop.gif
ezgif.com-crop.gif (27.63 KiB) Viewed 23 times
Post Reply