How would i make a duck function?

im making a platformer and im making a duck that you can do, the problem is, you can still move while ducking, how would i disable the walking function? i scripted it so you can use wasd and arrow keys to move. Thanks in advance!

i suggest to work with finite state machine.
http://compilgames.net/wiki/doku.php/gdevelop/tutorials/howtofinitestatemachine

2 Likes