(SOLVED)Boolean not working for key is pressed

I am trying to disable “key is pressed” when my player makes contact with an enemy.
I am using a boolean whenever my character makes contact with an enemy in order to turn off all actions. I am using the condition “The variable isDead of Player is false” on all actions for the player. Everything works with the boolean except for the “key is pressed” condition for simulating jump.

I just want to make it so the jump key doesnt work after the player made contact with the enemy.
Right now the player can still jump in place regardless of the boolean condition.

In red are the conditions that are not working together properly.

I am following a tutorial and in the video it works fine but I am not sure why it isnt for me.

I just started using the program, I have zero experience in game dev so I would appreciate the help!

Thank you!

Make sure you have this option checked on the Player’s behaviour:

3 Likes

It works for me

I would do what MrMen said, check if u have the option ticked

1 Like

This worked!

Thank you!

If i can ask, would you explain what disabling default controls mean?

1 Like

This worked! Thank you!

1 Like

It means this :

when you get the behaviour on the player, it will automaticly be able to move if you click right or left and able to jump (if there is a platform obv lol)

but sometimes ppl want the player to move by wasd not arrow keys, so they disable the default controls , so the arrow keys don’t work, and they do it manually. (using events)

the reason it probably didn’t show you this in the video is maybe cause its old?

cause older versions of gdevelop i think you had to do it manually.

(Hope I didn’t write this in a unclear way, let me know if you didn’t understand!) :+1:

4 Likes

gotcha, i think i understand.

Thanks again!

1 Like

Hello!

Well done ZGC! :+1:

To MrMen: it’s been a long time before to see you again! :smiley:

A+
Xierra

1 Like

It’s summer in my end of the world, and I’ve been on holiday :beach_umbrella:

2 Likes

Why thank you Habitué! :heart:

Its also summer for me!

Didn’t go anywhere, but I enjoyed the nice weather for a change! :sunny:

Hope you had a good time! :sunglasses:

1 Like

To encourage you for your help on this post.
I think it’s important to maintain a good atmosphere on a forum and I consider that you contribute a lot.

A+
Xierra

1 Like

There are still some who are lucky! :smiley:

Where I live, it’s damp and gray. A mild winter however, compared to the normal weather it should be like where I live.

A+ the lucky ones :rainbow:
Xierra

1 Like

Aw man, now I feel sorry for you. :confounded:

1 Like

It gets worse!
Isn’t it Donald… :smile:

A+
Xierra

1 Like