Dashing

Get help using Construct 2

Post » Thu Sep 19, 2013 5:32 pm

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.
B
5
G
1
Posts: 21
Reputation: 417

Post » Thu Sep 19, 2013 5:45 pm

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.plinkie2013-09-19 17:46:07
B
47
S
18
G
84
Posts: 2,262
Reputation: 49,778

Post » Thu Sep 19, 2013 5:48 pm

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?
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,377

Post » Thu Sep 19, 2013 5:49 pm

Oh and, tell us your native language, please.
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,377

Post » Thu Sep 19, 2013 5:50 pm

And why the heck don't you provide us with a file?
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,377

Post » Thu Sep 19, 2013 7:45 pm

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...
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,603

Post » Thu Sep 19, 2013 9:01 pm

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

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

press the space bar to dash.
B
26
S
7
G
1
Posts: 83
Reputation: 2,575

Post » Tue Nov 12, 2013 8:37 pm

Mantep oooom. lanjutkaaan!!
B
11
S
2
G
2
Posts: 62
Reputation: 2,153

Post » Wed Nov 13, 2013 2:33 am

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.siks2013-11-13 02:33:58
B
53
S
12
G
7
Posts: 133
Reputation: 9,405


Return to How do I....?

Who is online

Users browsing this forum: max2612 and 5 guests