Character not bouncing up when jumping on trampoline

Hello everyone,

New to Gdevelop, and Im trying to get my character to bounce up high when they collide with my trampoline sprite, but it’s not doing it. I added a sound effect to it, and everytime the character touches it the sound plays, so collision is happening, but for some reason they just bounce a regular height and not the high height I intended. Here is my code.

1 Like

I don’t think value “the current falling speed” is right, try change to “jump speed”

Hi phTyn! Firstly, I want to thank you for replying, since this project is really important. I tried to use jump speed but and the character does bounce, but they do not bounce to the height that I set. It’s more like a slight tap. I’m assuming its because of the simulate pressing jump key, which does the bounce part, but the jump speed part isnt working. Also, my jump trampoline animation isn’t playing. I appreciate all the help.

There’s a trampoline extension. I’ve never used it. I looked at its function. It sets the jump speed when the player collides with a trampoline but it doesn’t reset it until the player is on a platform. Yours might be resetting the speed back to the default value too soon.

Snip of the trampoline function

A lot of the events are just to provide feedback on the jumping. The key is the set and reset.

IDKW theres a seperate test for if the player is exactly on top of the trampoline. It seems like only 1 event would be needed but I’ve never played with trampolines. In code anyways.

How about tween player Y pos when he is in collision with trampoline?

Or add force?

Yes you can just add a force at 270 degrees and decrease it as you jump. I’ve done both that and changing jump speed and I think just adding another force is easier