4-Direction Movement problem

This forum is currently in read-only mode.
  • (Before I say anything I'd like to thank Deadeye for his tutorial on animation )

    http://img520.imageshack.us/img520/4859/moveproblemju9.png

    Okay...

    My character can move up, down, left and right and it plays the animation of him walking properly.

    When he stops moving he goes back to his standing animation, like he should.

    When you are walking up/down and you press either left or right at the same time he doesn't change direction or stop moving.

    But...

    When you are walking left/right and you press up or down it DOES move him.

    I'm wondering if this is a fault in my event layout, or if it is some kind of a bug in Construct? I tried changing it from "Move Left" is down to key is held down but that didn't help.

    I tried removing the 8 Direction behavior (I switched it from 8 to 4) and made the sprite move manually but that caused a new problem; the sprite moves but it won't play the walking animation.

    I meant to copy the .cab to my player before I left for work but I accidentally copied the .exe instead, so I'll have to wait until tomorrow before I can post it.

    Not that its likely to help, but;

    http://www.mediafire.com/?y00t3lpy4ay

    Oh, I just started using Construct yesterday and tried getting a crop system working, so don't mind the fact that I only have the "facing down" animation for it added, and the fact that for some reason you have to hold down the shift key even though it is set to "pressed"... and never mind the fact that if you hold the key down for too long it locks you on the "standing still" animation when you try to move...

    One problem at a time.

    Well, thank you very much for any suggestions that you might have! I expect a certain amount of frustration whenever I try to learn a brand new program so I'm patiently optomistic about moving my old project to Construct.

  • If thats not the problem, send source becouse its hard to say from exe file and reconstructing it as cap... seriosly

  • Yeah, I'm sorry about that. When I realized that I copied the wrong file I wondered if I should even bother posting this. If I don't figure out the problem tonight I'll be sure to post it tomorrow.

  • Okay its probably the event-sort problem, sort it like:

    -Down is down.

    -Left is down.

    -Up is down.

    -Right is down.

    Copy it so you have 4 of them for every direction, then negate the stuff you dont want to have.

    Edit: Here's example, http://www.mediafire.com/?jjsqedwyygx oh yeah and that "Once while true" is to not loop the Angle change (OPTIMALIZATION!!! LOLOL)

    Edit2: Wow i just noticed the "Once while true" in your code, make them as sub-event and move the Angle change into it!

  • Thank you!

    ...I'll have to wait until I get home to test it but its a good suggestion.

  • I... wrote a tutorial on animation?

    Anyway, without the cap to go on I'd venture the same guess as Doppel, it's probably a hierarchy thing with your event conditions.

    Also... USE HOE! Those farmers get all the booty

  • I... wrote a tutorial on animation?

    He meant probably your "Hitler" game.

  • I... wrote a tutorial on animation?

    Well... sort of. I was referring to this answer that you gave long, long ago in the dark and troubling times known as "January".

    http://scirra.com/phpBB2/viewtopic.php?t=514

    Hmmm.

    A platformer starring Adolph Hitler... and a fangame. Technically, which is more loathesome?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • ... It's Adolf. Not Adolph.

  • Oh, that old thing. I totally forgot about that. I should update that now that the platform movement's been updated. It doesn't work right any more. Glad you found it useful, though.

    Hmmm.

    A platformer starring Adolph Hitler... and a fangame. Technically, which is more loathesome?

    I am a terrible person

  • Oh, that old thing. I totally forgot about that. I should update that now that the platform movement's been updated. It doesn't work right any more. Glad you found it useful, though.

    > Hmmm.

    >

    > A platformer starring Adolph Hitler... and a fangame. Technically, which is more loathesome?

    >

    I am a terrible person

    No, Deadeye, that platform is epic win.

  • ... It's Adolf. Not Adolph.

    Damn. I always get that wrong. Errr, well... its not like I write about him often or anything. I just...

    Anyway.

    Your suggestion worked, Doppel!

    However, I'm wondering if there is a bug in the 8-direction behavior after all.

    I kept everything the same but removed the events that tell the sprite which direction to move in and replaced it with the 8-direction behavior (switched it from 8 to 4) and once again the sprite still moves if you press up/down while you are pressing left or right.

    I'm going to stick with your method for now, but if it IS indeed a bug that can be fixed then I'll eventually switch back. I prefer it if nothing happens when you press two direction keys rather than halting your movement entirely.

    Oh, and I fixed the problem with the Hoe not working properly. She just needed to have her spirit broken.

    (On the part where I put inverted controls and had it switch to the standing animation, I originally had the inverted left-shift underneath the direction keys, but that overrode the animation of the Hoe being swung. I moved the inverted shift to the sub-event containing the "trigger once if true" command and it fixed the problem)

    Thanks again for your help Doppel! (and Deadeye as well, even if he wasn't aware of it )

    http://www.mediafire.com/?bn2iyhzemsj (the .cab)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)