Add delay after key is pressed and then released

Like this:

I’m trying to add a delay after firing a projectile - so if the key is pressed, there is a delay of 0.5s after each consecutive shot:


But if I Press > Release > Press, there is no delay of 0.5s applied, how can I apply the delay after the key has been released too?

Why is there not a node connecting to the delay function’s duration pin (green)? Is the delay going to occur after the press or after the release?

You don’t need a connection there. The delay happens after the execution line successfuly triggers, in order to reset the do once. Try the code… :wink:

What’s that duration pin for? I didn’t think it worked only if the duration pin is connected. It’s something I’m new to…

It’s there for when you want to connect a variable for the duration instead of typing it.

Its working now, thanks. Merry Christmas!