how to do a backstep/dodge?

For questions about using Classic.

Post » Thu Sep 09, 2010 8:45 pm

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

http://www.youtube.com/watch?v=WwGXoqYH ... re=related

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.
B
4
S
2
G
2
Posts: 109
Reputation: 1,318

Post » Thu Sep 09, 2010 10:18 pm

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"
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Sat Sep 11, 2010 10:27 pm

awesome, i got it to work just the way i wanted! thank you so much for helping me out.
B
4
S
2
G
2
Posts: 109
Reputation: 1,318

Post » Fri Apr 13, 2012 2:24 pm

Uh what does the + and - mean exactly and how do I input it to my program exactly?
B
3
Posts: 2
Reputation: 279

Post » Fri Apr 13, 2012 8:13 pm

He's using the + to represent a condition, and the - to represent and action in the events
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Mon Sep 09, 2013 6:38 am

Please could you send a capx or image of your work.i really need to know how its done.thanks :-)
B
6
Posts: 31
Reputation: 639

Post » Mon Sep 09, 2013 1:33 pm

[QUOTE=planetheads] Please could you send a capx or image of your work.i really need to know how its done.thanks :-)[/QUOTE]


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.
B
4
S
2
G
2
Posts: 109
Reputation: 1,318


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests