Dont execute events if holding down a key

Im trying to set up dialogue in my project, but I noticed one problem. If I hold down the key to progress dialogue (Return), it will scroll through all the dialogue in about a second. Any way to make it so that it goes through the dialogue only when Return is tapped once, not held down?

1 Like

Have You tryed On release?

On Release works, but I want the dialogue to progress only when Return is pressed once. Im trying to use timers to count how long Return is pressed, but its not working

@Causatum Try using the “Trigger once” condition. It triggers the actions only once when the conditions are met.

2 Likes

Heres what I did, with some unnecessary info blurred out. When the Return key is pressed, it changes the dialogue to the next one, but if its held down, it just goes through all of them almost instantly. I tried the Trigger Once condition but it still happened

Try starting a timer when the dialogue starts. Add an if timer is greater than 2 seconds in the dialogues. And reset the timer when there is new dialogue

Ps. Sorry if my description is too confusing. I have to go now but when I get to my computer, I will show you what I mean

As @piyushpalawat99 was suggesting you need to use the Trigger Once condition together with the Return key is pressed condition, so the action trigger only once while the key is down.

Try timers in between pieces of dialogue so they have to wait a bit to progress it. Half a second or a full second should work.

Also reset the timer for dialogue after return is pressed/released and when it reaches a second or whatever allow it to be used again for the dialogue.