How do I add a functioning dash to my autorunner

Just started using Construct 2? Post your questions here

Post » Mon Sep 29, 2014 6:15 pm

Hello everyone. I've been working on an autorunner and I've run into some problems. Har har! I've actually done quite a bit research but I can't get the dash to function correctly.

So basically I just want to make my player dash forward for a moment. I've checked out a few different posts and learned a little more about what goes into an autorunner. If I used the original autorunner template, I would have to change the speed of every object except the player to create the illusion of a boost.

So I found this post explaining how to just add a boost to just specifically the player but I can't get it to work.

scirra.com/forum/how-do-i-auto-runner-with-all-kinds-of-stuff-math-is-hard_t112090?&hilit=math+is+hard

I've downloaded a few different capx dash examples and but the lines of code won't seem to work with my project. I imagine it's not working because I have the player set in place so the game can't boost the players speed because he's set in place. I'd appreciate any help on this issue. I've attached the capx. Thanks!
You do not have the required permissions to view the files attached to this post.
B
28
S
14
G
21
Posts: 179
Reputation: 13,548

Post » Mon Sep 29, 2014 7:17 pm

add action
choose enemy
set bullet speed
wait 3.0 sec
reset bullet speed of the enemy again
B
2
Posts: 5
Reputation: 260

Post » Mon Sep 29, 2014 8:27 pm

something like this?
You do not have the required permissions to view the files attached to this post.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Sep 30, 2014 5:29 am

Thanks yousef77! That bit of code definitely helped out since I was having trouble doing even just that. But I'm actually trying to create an endless runner another way though. I'm trying to just boost the player character instead of boosting everything in the background. Isn't there a way create an endless runner like that? It seems like it would be less messy then having to boost/dash multiple objects. I want to increase the players speed for .75 seconds or whatever so the player actually dashes instead of shifting all the background sprites to create the illusion of dashing.

You see, right now I only have the platform block and one enemy but I'm going to add more of both. I mean, I don't know. Which way would be the best way to approach creating a moderately fully fleshed out competent autorunner?

LittleStain, I can't open your capx. It seems you might have a super advanced alpha beta professional build of Construct 2! I only have r178.
B
28
S
14
G
21
Posts: 179
Reputation: 13,548

Post » Tue Sep 30, 2014 7:18 am

Downloadlink to the beta is at the bottom of this page..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Oct 01, 2014 7:54 pm

Oh wow! Interesting! No, that's not the effect I'm trying to accomplish LittleStain but thanks for showing me that! That could definitely be some sort of attack or something since I plan to add an upgrade system. Thanks for telling me about the beta link too, never noticed.

Here's what I'm trying to do. Basically, I'm trying to do the opposite of what yousef77 explained. Instead of moving the background quickly, I want to move the player quickly. It might be that that just not possible...? The capx I added is basically what yousef77 told me to do. I change the bullet speed of the enemy and block so it looks like the player is dashing.

If I where to do it this way, how would I add the short amount the player just gained to the total distance? I imagine it would be something like:
system Add Block.Bullet.Speed + 300(or whatever the amount of pixels I just moved) * dt?
You do not have the required permissions to view the files attached to this post.
B
28
S
14
G
21
Posts: 179
Reputation: 13,548

Post » Tue Jun 09, 2015 3:49 am

in autorunner template why i cant "re write" that source code in new file? my code just same but when i clik play it wont work. i still interest with random block movement. but i still got stuck in that code. anyone here can help?
B
4
Posts: 3
Reputation: 206

Post » Wed Jun 10, 2015 6:13 pm

jomblo1 wrote:in autorunner template why i cant "re write" that source code in new file? my code just same but when i clik play it wont work. i still interest with random block movement. but i still got stuck in that code. anyone here can help?

why dont u open an topic ?:P that way youl get more answers to your question, and maybe you might missed a few button behaviors, as if you are actually using button object make sure its active at start, and not deactivated, so it will work, if its not a button but a sprite then check the touch/click condition for it, its impossible not to work!
B
75
S
22
G
68
Posts: 1,337
Reputation: 43,271

Post » Fri Jun 12, 2015 3:16 pm

gamecorpstudio wrote:why dont u open an topic ?:P that way youl get more answers to your question, and maybe you might missed a few button behaviors, as if you are actually using button object make sure its active at start, and not deactivated, so it will work, if its not a button but a sprite then check the touch/click condition for it, its impossible not to work!


you correct sir,, me less scrupulous , thank you for giving advice . I am new in this world . but when i found the problem more curious iam...
B
4
Posts: 3
Reputation: 206


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests