Dashing

0 favourites
  • 9 posts
  • I've experimented here and there with by moving pixels. My question is:

    Does the accerelation or speed have anything to do with how far pixels jump/move?

    Ex. my acceleration is about 300, while my x movement (dash)when pressed is 500 pixels. If I stand idle the sprite and press the dash button it'll jump forward, BUT when I run and press the button it seems to be less movement, or it won't even move at all.

    Can anyone give me a helping hand?

    I haven't saved any files or made a dropbox for this particular question. It's just something I've encountered.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you're running at 300 pixels per second and then you dash at 500 pixels across I guess you'll only move forwards by a noticeable 200 pixels, whereas when you're idle you will move forwards 500 pixels? Not sure if this is 100% correct but it's something related.

  • Wait. So when you stand idle and dash, you have about 300-500 pixels per second, but when you dash while moving you slow down?

  • Oh and, tell us your native language, please.

  • And why the heck don't you provide us with a file?

  • If you want relatively the same amount of movement for idle and running you may want to try and assign vectorX to itself + 500 instead.

    So instead of Set VectorX + 500, try Set VectorX = VectorX + 500

    I can't really test it right now but it may help you...

  • Not sure if it will help or not but here is an old .capx i made to help with a dashing question before.

    dl.dropboxusercontent.com/u/45198/MMX%20dash.capx

    press the space bar to dash.

  • Mantep oooom. lanjutkaaan!!

  • This is how I did it:

    1) Give your player object an instance variable called "dash" and set it to 1

    2) On the event sheet, do something like this:

    + dash > 0

    • player - subtract 1 from dash // this prevents the player from dashing every time he pushes the button
    • player - set vector y to 0
    • player - set gravity to 0
    • player - set maximum speed to 1000
    • player - set acceleration to 8000
    • wait 0.25 seconds
    • player - set gravity to original gravity value
    • player - set maximum speed to original maximum speed value
    • player - set acceleration to original acceleration value

    Change the numbers in bold to fit your game.

    Worked pretty well for me.

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