I often use delays to activate or deactivate a component (like fire) but sometimes it could create some bugs if the actor is reset before the delay ends (for instance, when I simulate the reload of the level, I reset fire to off but if the delay is not finished, is set it back to on).
Is there a way to cancel a delay? Maybe “Task Wait Delay” could help me but i don’t know how to use it…
However, you can start activating/deactivating things based on relevant criteria instead of using “hard” delays (delay x amount of time and praying for the best).
You CAN cancel a delay, but you have to use C++. I added a blueprint node that will cancel all pending delays for a given blueprint actor. Technically, it cancels all pending latent actions, not just delays, so it can have additional side effects – careful.
yes, old thread, but since it’s the first to come up when googling…
here’s an example of one possible solution for a common case:
retriggeable_delay is forced to trigger ‘immediately’, which then gets intercepted