How do I make a side dash mechanic

Get help using Construct 2

Post » Wed Jun 01, 2016 1:26 pm

As the title states, I'm currently trying to make a side dash mechanic akin to the one from Megaman X with no success. I'm fairly new to Construct and not the best at coding. I've searched through the forums and haven't been able to figure out how to get this mechanic to work properly as I'm also tying in a stamina/energy cost to use the ability.

What I'm trying to do is create the ability that when the player presses the corresponding button (shift in this case), the player will perform as dashing function in the direction they are currently facing, but what I also want to do is have it move the character a short distance if the key is simply pressed and a max set distance if held.

Adding in the ability cost is a simple matter that I can tie in after its working, but I simply cant get it to function period. Currently the player sprite/box has the platform behavior attached to it. Most from what I've read is to try and use time, or delta time (not sure if same or different), and functions. Now functions I've searched and searched but I cannot figure out how to create, set-up, and call so help with that would also be helpful...

Currently I had it set to if the stamina was less than the cost the ability was un-useable (simple enough), but if it was useable I had it set to subtract the cost from stamina & if the player was facing right, then it was to ignore input, set the availability to 0 (might have been better if set up for as long as there is stamina left), simulate the direction right and change the X-vector to the max distance. Once max distance was reached, then it was set to Stop Ignore Input.

Any help on this problem would be greatly appreciated!
B
3
Posts: 2
Reputation: 181

Post » Wed Jun 01, 2016 2:20 pm

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Jun 01, 2016 3:14 pm

It won't let me due to version difference. I'm using a steam copy which is version 227, and the file says yours was done in 229...
B
3
Posts: 2
Reputation: 181

Post » Wed Jun 01, 2016 3:31 pm

dash platformer see if this helps you,it might be r227 if its bigger just edit the .caproj info.
B
78
S
23
G
69
Posts: 1,353
Reputation: 44,025


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests