8 direction movement not right, sprite jumps

This forum is currently in read-only mode.
0 favourites
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hi all i have created a simple orange diamond to test 8 direction movement, and when u press it to move it doesn't always just move, it kinda jumps.

    Here is the file: http://www.gundam00episodes.com/fff.cap

    Just move up and down, you will see it jumps, that's not right, it should just move the sprite itself and thats it.

  • It's how it works dude, you have to give some Events like:

    +Facing Right

    -Can't go Left

    Etc.

  • I don;t get what that means, to me that says when they are facing right they can't go left??

    This movement is useless if when you move another direction it makes the sprite jump!

  • If it's useless then dont use it, make your own movement.

  • I have tried, but can't get my head around it, there is no option to set a sprite in motion on a click or press of a key.

    It just seems stupid that an 8 direction type movement makes a sprite flip itself when going another way, that shouldn't be!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have tried, but can't get my head around it, there is no option to set a sprite in motion on a click or press of a key.

    No, there isn't. You have to make your own:

    +Control "Move Left" is down
    [ul]
    	[li]Set sprite.X to (sprite.X-5)[/li]
    [/ul][/code:tfm7kge0]
    
    This will move the sprite five pixels to the left every frame while the "Move Left" key is held down.  Knowing that, I'm sure you can guess what this does:
    
    [code:tfm7kge0]
    +Control "Move Down" is down
    [ul]
    	[li]Set sprite.Y to (sprite.Y+10)[/li]
    [/ul][/code:tfm7kge0]
    
    

    It just seems stupid that an 8 direction type movement makes a sprite flip itself when going another way, that shouldn't be!

    It flips itself so that when you quickly change to the opposite direction you don't have to wait for the sprite to rotate all the way around. As Doppel said, that's just how it works.

    IIRC there is an option for no rotation in the properties. You could always just check that and manually update your sprite frames based on what keys you are pressing.

  • I don't see why it has to rotate the object or flip it at all, a movement where the sprite stays static in its rotation and just moves in the direction pressed, that would be an ideal proper movement.

  • You can have one object do the movement, then have another object on top always set to the position of the object with the movement.

  • You can have one object do the movement, then have another object on top always set to the position of the object with the movement.

    Heh i suppose that would do it, having the actual movement object just an invisible dot, set the sprite always on top, guess it could work.

  • Just a note if x is left and y is up, what are the other two?

  • Just a note if x is left and y is up, what are the other two?

    X,Y are dimension, x is horizontal, y is vertical.

    X-1 means it will go left by 1

    X+1 means it will go right by 1

    Y-1 means it will go up by 1

    Y+1 means it will go down by 1

    Simple math =D

  • Well don't judge but maths has been, gone and failed for me a long time ago!

  • And you want to Create games/programs?

  • Y-1 means it will go down by 1

    Y+1 means it will go up by 1

    Actually, it's the other way around <img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" />

  • Its inverted then, ok gonna repair it XD thx.

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