Movement Behavior Flaw/Problem[solved]

This forum is currently in read-only mode.
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • ty all

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The left/right thing was actually made that way on purpose in response to problems with the built in behaviors, specifically in platforming where holding down both left and right at the same time produced odd looking results.

    Changing it back would be back-tracking. Though I guess, as you suggested, having the option to pick which way you want it to behave would be the best idea.

    As for professional fighting games and such... those are usually played with arcade sticks or, at the very least, gamepads, so you can't ever press both left and right at the same time anyway. There is no "right way" to do keyboard controls really, as there's no standard for it, and everyone is going to play differently. Playing on the keyboard allows for really sloppy keypresses that you wouldn't ever have to bother worrying about on sticks or pads. And special circumstances usually call for special attention, which means it's not something that only a few people would actually use, therefore it doesn't need to be put in as a general feature, yadda yadda. But every time I make that argument one of the devs comes along and says "sounds good, we'll put it in!" so what do I know?

  • When you hold the left and right arrow keys, the 8 direction movement ignores both, acting as if no keys were pressed at all (as Deadeye says, in response to bug reports about holding both left and right down at the same time). However, you can always circumvent this by using a set speed or something instead.

    I think what you want is a set X and Y velocities manually in 8 direction? It seems the problem arises when you Set Angle in the sprite and the 8 direction's angle of motion doesn't update.

  • ty for speedy replies

  • Ignoring input is bad IMO.

    Actually, it kind of makes sense: pressing both left and right at the same time causes equal acceleration in opposite directions, resulting in a zero force overall.

    [quote:1430iv5h]In a fighting game ignoring input might mean a move not coming out.

    How come? Why is the 8 direction movement responsible for affecting your events involving a separate object (mouse & keyboard)? It doesn't make the key get globally ignored - the mouse & keyboard object still sees all keypresses - it's only the 8 direction movement that has a special case for left and right held down. If you code a key combination to produce a move with the mouse & keyboard object, the 8 direction movement will not affect this.

    [quote:1430iv5h]Remember I have to make it remember when it's double pressed even when it's moving in the opposite direction.

    Why does this require 200+ events? Surely you don't need to take in to account the current direction. You could just do:

    + On 2nd tap of double tap

    -> Set angle to ... (assuming 8 direction updates direction of motion here as well)

    -> Set speed to ...

    Alternatively you could always ditch the behaviors and code your own custom movement, which I think one of your examples demonstrates. It's not a large amount of events to reproduce the 8 direction movement. I can't figure out why you think you'll need so many events!

  • I have to agree that pressing 2 keys at once would cancel each other out; it's perhaps a remedy of translating a joystick into keys. If you were to yank the stick both ways it'd end up in the center.

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