Trampoline - if player ALSO presses jump the player goes even higher - how do I stop this?

Hi there!

Tried a few things, but I’ve got stuck.

Basically I’ve got a trampoline behaviour on an object called ‘MUSHY’. If the player collides with it the actions simulate pressing the jump key - and increases the jump speed. This works!

However - if the player ALSO presses the jump key the player goes even higher! I want to prevent this but can’t find a way


.

Can anyone help? Here’s my actions:

Hey, did you try to only allow jumping (pressing the jump key) when the player is not colliding with the mushy?

Hi Insein, thanks for your help

I’m very new to all this, so I’m not sure how I’d do that - what would be a condition/action to add for that?

No problem!

Just place the condition/action “if space key is presses → simulate jump” in a sub event under the “player NOT in collision with MUSHY”

You should also have the default controls uncheck it in the platformer behavior and the other control keys remapped in the events.

I think where I’m getting stuck is that I don’t know ‘how’ to create an event (action?) that is an ‘IF’ statement. i.e. how do I create a string that says “If Jump is pressed then simulate Jump”?

Do I add it as some kind of action? (see screenshot).

Also if I uncheck the default controls on the player character - she can’t move!

A condition is the if statement.

That’s why you need to remap the keys. Check the attached screenshot.

Ah, cheers. I’ll have a play with that later and report back. Thanks for your help on this, really appreciated. So close to achieving what I’m after :slight_smile:

No problem, happy to help. Cheers