How do I bounce X back faster than the max speed (platform)

0 favourites
  • 2 posts
From the Asset Store
Support AdType ( AppOpenAd, Banner Ad, Interstitial Ad Rewarded Ad, MREC Ad) support c3 build service
  • So I'm working on a platformer where players fight each other with guns. These guns do not kill the other player but bounce them back an X amount. I've set a max speed for the players, to make sure they don't pass that speed (sounds logical right?).

    The players need to 'bounce' back, whenever a bullet hits them. Now here's the problem: I want that bounce to be able to exceed that 'max speed' stat. How do I do that?

    One solution I thought might work is 'on left press -> set vector X', but then I didnt like the way the character moved, it didnt look 'natural'. But if that is the solution, what should I add to that event to make the character move more natural?

    Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmmm?

    You can create a global variable that reads max speed.

    MaxSpeed = player max speed

    Then add whatever speed you want to increase that to.

    On bullet collision with player: Set player max speed= Maxspeed+500

    Something like that but not sure if it is the effect you want. It would depend on if you want that a sustained change or just temporary effect.

    If temporary add in a wait for so many seconds and then reset the player speed to Maxspeed.

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