Bouncing platform without physics?

I need to make a bouncy platform that jumps the platformer character higher than usual (can’t use ‘Simulate jump button pressed’)

I have a collision between the player hitbox and a jump object, but can’t figure out what to add from there. Any thoughts?

1 Like

You could probably just use the “add instant force” event.

1 Like

Thanks for your help. I’m finding that the character seems to move up a few pixels but immediately move back down in a jittery effect, so it just jitters on the spot. Is it to do with the collision?

Here’s a gif of it: https://i.ibb.co/6bncTS6/Jump.gif

That just means you’re probably not using enough force, increase the amount of pixels you’re using.

Doesn’t seem to help - it transforms him right up into the air immediately and then drops him down as per gravity. Like it’s not a smooth jump upwards. Thanks anyway.

You might need to use a timer. Otherwise the force is only being applied for 1 frame.

So like, Start a “Bounce” timer on the collision
Then do a “If Bounce timer is greater than 0.5 seconds (Inverted)” “Apply instant force blah blah”

And a separate
“If Bounce timer is greater than 0.5 seconds” “Delete Timer (Bounce)”

Does Platformer behaviour allow you to change jump power in gameplay? If yes then you can try below, if you’re willing to use “Simulate Jump Pressed” (otherwise, what are you making that it can’t be used?)
You could try using a variable to hold the ‘original jump power’ and a second jump power variable that decreases during each bounce.
Each bounce you decrease the second variable by some amount and when the player lands on normal ground assign the original jump power back to the player again.

Otherwise, if we’re avoiding “simulate jump pressed”…
Silver’s suggestion might’ve had problems is because the “gravity” is still in place when the character bounces. Does it count as the player landing on a platform when they bounce? If not their downward velocity might be greater than your upper speed.
To add to their suggestion, in the “apply instant force” you can also use a variable that decreases each frame.

Temporarily editing the platform character behavior via a timer and variable as Cat mentioned should work. You’ll want to change jump speed and gravity on collision + unpause the timer, then put the behavior properties back to your ‘default’ setting when the timer is stopped and reset. Use the variable “bounce” as true/false. True + unpause timer, false + pause/reset timer.

Thanks @reina and @Phenomena , I think switching to another jumpheight variable for the player would be cleanest and may not need a timer (as long as it can switch in the split second on collision, and then switch back).

Unfortunately I’m new to this, and I’m unsure how to call that variable through the events editor.
I could use “Modify a variable of an object” but I have to call it through text - is that something like “player.platformcontrol.Jumpheight()”?

And then ‘If falling’ set back to normal?

It’s possible to change the jump speed through an event made for it.
I’ll just assume you know how to calculate the bounce jump variable… (The button I highlighted in blue is a list of referencing objects by text, so look through it)

I also found this, but it doesn’t let you change the player’s jump speed. Maybe it lets you check the current number instead?
edit: I accidentally chose “Max falling speed” instead of “Jump speed”, and I’m too lazy to test it again

As for setting jump speed back to normal I’d check if the player has landed on a non-bouncy platform (you can put the “normal floor objects” in an Object Group to check for this, if you have many platform types). Setting it to Normal while falling means that when the player stops going up in a jump, they will have normal jump speed before even landing. It might work too!

I did something exactly like this with my Santa Platformer game:


You can change the jump speed of your platformer and then set it back to normal when they’re not in collision with the bouncy platform or bouncy object. This also works for a sprite that can work like a spring object.

2 Likes