Saving Player Facing Direction for Up/Down Walking (Adventure Module)

Having trouble compiling code? Getting an unexpected error? Player not appearing on screen? Seeking answers on how to do a particular thing? This is the forum you're looking for, to ask other NESmaker users for assistance.
Post Reply
User avatar
dark_crow_66
Posts: 124
Joined: Wed Apr 18, 2018 1:59 pm

Saving Player Facing Direction for Up/Down Walking (Adventure Module)

Post by dark_crow_66 » Sun Jan 13, 2019 11:00 pm

I'm trying to get my character to save the direction he was facing if you press up or down. I have successfully been able to bypass up animation being set to the left walking animation, and make it display the right walking animation, but I cannot get it to display the animation based on the players current facing direction. Any suggestions on what to add to the StartMovingPlayerUp script to save players current facing direction? Thanks.
User avatar
dale_coop
Posts: 3596
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Saving Player Facing Direction for Up/Down Walking (Adventure Module)

Post by dale_coop » Sun Jan 13, 2019 11:09 pm

You mean your player walk to the left... then you press UP, and you want he goes down but still facing left?
I would say try just commenting out the "FaceDirection player1_object, FACE_UP" ?

Or am I misunderstanding the question?
-----
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)
User avatar
dark_crow_66
Posts: 124
Joined: Wed Apr 18, 2018 1:59 pm

Re: Saving Player Facing Direction for Up/Down Walking (Adventure Module)

Post by dark_crow_66 » Sun Jan 13, 2019 11:28 pm

dale_coop wrote:
Sun Jan 13, 2019 11:09 pm
You mean your player walk to the left... then you press UP, and you want he goes down but still facing left?
I would say try just commenting out the "FaceDirection player1_object, FACE_UP" ?

Or am I misunderstanding the question?
I'm trying to get my character to use left/right walking animations when you press up and down based on the last direction he is facing. Like in a beat 'em up. So if I'm walking left then i press up to go up, i still want him to do left walking animation. If I'm walking right then press up to walk up, I still want him facing right. Same for down.

User avatar
dale_coop
Posts: 3596
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Saving Player Facing Direction for Up/Down Walking (Adventure Module)

Post by dale_coop » Sun Jan 13, 2019 11:33 pm

Ok perfect... ;)
So yep, I think "just" commenting out the "FaceDirection player1_object, FACE_UP" should do the trick.
-----
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)
User avatar
dark_crow_66
Posts: 124
Joined: Wed Apr 18, 2018 1:59 pm

Re: Saving Player Facing Direction for Up/Down Walking (Adventure Module)

Post by dark_crow_66 » Sun Jan 13, 2019 11:44 pm

How do i paste my code so it displays like it does in Notepad++ ?
User avatar
dale_coop
Posts: 3596
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Saving Player Facing Direction for Up/Down Walking (Adventure Module)

Post by dale_coop » Mon Jan 14, 2019 7:20 am

You mean paste in a forum post? You could use
[ c o d e ] paste you code between these two tags [ / c o d e ].

(or go in the "Full Editor & Preview" mode and use the insert code button < / > )
-----
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)
Post Reply