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

Get help using Construct 2

Post » Fri Feb 24, 2017 3:15 pm

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!
B
12
S
1
Posts: 28
Reputation: 978

Post » Fri Feb 24, 2017 3:58 pm

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.
Banned User
B
23
S
6
G
58
Posts: 1,229
Reputation: 34,540


Return to How do I....?

Who is online

Users browsing this forum: megatronx, RetrocadeMedia, Taximan, totoe and 1 guest