0 Favourites

how to do a backstep/dodge?

This forum is currently in read-only mode.
  • Hi al! finally decided to make a thread for this problem im having. ive been searching the forums for an answer for a few days now,but no luck yet. im new btw so be gentle ok?

    ive been learning to use construct for a few weeks now and ive managed to create a simple basis for a platformer,using other ppls examples and tutorials.have to say im getting more and more excited about construct,its really fun to use and pretty easy too,atleast compared to gamemaker. im gonna do a satirical platformer starring one of my friends, and im gonna give this game to him on his birthday.

    ok so on to the problem:

    what im trying to do is sort of a dodge/backstep kind of move,where the player shortly slides backwards when a key is pressed(i also plan to use this same move when the player takes damage).

    in short,kinda like blatantly copying the dodge from castlevania: SOTN

    to be more specific look here

    its the move around 5:57 or so.

    ive managed to sdo this move(sort of),but with 2 separate buttons(example: press x--move to right / press z--move to left),but it isnt very practical..

    how can i make it so that the sprite always moves backwards,when i press a key?

    i just cant for the life of me figure it out and i would be really grateful if someone could help me out a bit.

    thanks in advance and sorry if my english sucks.

  • Off the top of my head O_o;

    +input that makes player dash is pressed

    -set value "dash" to (duration of dash in milliseconds)

    +value "dash" is greater than 0

    +player is facing said direction

    -set x component of motion to (speed of dash, - is left + is right)

    -subtract 1 from "dash"

  • awesome, i got it to work just the way i wanted! thank you so much for helping me out.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Uh what does the + and - mean exactly and how do I input it to my program exactly?

  • He's using the + to represent a condition, and the - to represent and action in the events

  • Please could you send a capx or image of your work.i really need to know how its done.thanks :-)

  • Please could you send a capx or image of your work.i really need to know how its done.thanks :-)

    wow, now this takes me back lol.

    just a heads up: this was for Construct Classic. i dont have construct2, so i cant make a capx for it. here's a picture for CC to get some basic idea how its done, using platform behavior:

    https://www.dropbox.com/s/4kvgk6malymp21o/dodge-pic.jpg

    if you have CC i can send the barebones example .cap

    hope it helps.

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