How do I add a functioning dash to my autorunner

0 favourites
  • 9 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • 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!

  • add action

    choose enemy

    set bullet speed

    wait 3.0 sec

    reset bullet speed of the enemy again

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • something like this?

  • 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.

  • Downloadlink to the beta is at the bottom of this page..

  • 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?

  • 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?

  • 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!

  • 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...

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