# Retriggerable Delay

**URL:** <https://forums.unrealengine.com/t/retriggerable-delay/784915>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [March 6, 2023, 2:37pm UTC](https://forums.unrealengine.com/t/retriggerable-delay/784915 "2023-03-06T14:37:49Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilailevavi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ilailevavi](https://forums.unrealengine.com/u/ilailevavi)\
**Post date:** [March 6, 2023, 2:37pm UTC](https://forums.unrealengine.com/t/retriggerable-delay/784915/1 "2023-03-06T14:37:49Z")

</div>

Hi, Someone Knows what’s the problem in the code?  
why is the Retriggerable delay does not work?  
When I’m picking up a coin I want to start a delay and if i take another coin within the delay time restart the delay. if not set coins to 0  
somehow when i use print sting i see that the coins restart after 8sec and ignore that i’m overlaping the retriggeable delay.

 ![5eda4e3908c47b14b055995e82a52a38](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/7/50718e9ecc3da5313c2d32c2dde26123759b5e55.png)

Thank you!

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 6, 2023, 2:41pm UTC](https://forums.unrealengine.com/t/retriggerable-delay/784915/2 "2023-03-06T14:41:40Z")

</div>

The print string is firing before the delay. It doesn’t tell you if you’ve passed the delay.

What’s on the left of this code?

---

<div class="post-metadata">

**Author:** ![ilailevavi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ilailevavi](https://forums.unrealengine.com/u/ilailevavi)\
**Post date:** [March 6, 2023, 2:47pm UTC](https://forums.unrealengine.com/t/retriggerable-delay/784915/3 "2023-03-06T14:47:10Z")

</div>

![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/4/e/04e6ac8dfebf7962e18c808694895f538ddea0ea.png)  
 ![2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/8/0/980d986ec22645278ba8711c4fb1b50e559daf6e.png)  
 ![3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/4/6/b4601c0e47a45588bb50e925897772ead4b20f30.png)

---

<div class="post-metadata">

**Author:** ![ilailevavi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ilailevavi](https://forums.unrealengine.com/u/ilailevavi)\
**Post date:** [March 6, 2023, 2:47pm UTC](https://forums.unrealengine.com/t/retriggerable-delay/784915/4 "2023-03-06T14:47:34Z")

</div>

![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/4/e/04e6ac8dfebf7962e18c808694895f538ddea0ea.png)  
 ![2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/8/0/980d986ec22645278ba8711c4fb1b50e559daf6e.png)  
 ![3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/4/6/b4601c0e47a45588bb50e925897772ead4b20f30.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 6, 2023, 2:53pm UTC](https://forums.unrealengine.com/t/retriggerable-delay/784915/5 "2023-03-06T14:53:59Z")

</div>

I don’t get where pic 3 fits, but… it looks like if you pick up one coin and wait 8 secs, it will set the coins in the game mode to zero.

---

<div class="post-metadata">

**Author:** ![ilailevavi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ilailevavi](https://forums.unrealengine.com/u/ilailevavi)\
**Post date:** [March 6, 2023, 2:58pm UTC](https://forums.unrealengine.com/t/retriggerable-delay/784915/6 "2023-03-06T14:58:35Z")

</div>

> [@ClockworkOcean](#):
>
> don’t get where pic 3 fits, but… it looks like if you pick up one coin and wait 8 secs, it will set the coins in the game mode to

yes basically this is what i’m trying to do. but i want to restart the time if i’m taking anothe coin

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 6, 2023, 3:00pm UTC](https://forums.unrealengine.com/t/retriggerable-delay/784915/7 "2023-03-06T15:00:23Z")

</div>

Yes, that looks like what it goes. But like I say, what’s the connection between pic 2 and 3?

---

<div class="post-metadata">

**Author:** ![ilailevavi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ilailevavi](https://forums.unrealengine.com/u/ilailevavi)\
**Post date:** [March 6, 2023, 3:03pm UTC](https://forums.unrealengine.com/t/retriggerable-delay/784915/8 "2023-03-06T15:03:12Z")

</div>

![55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/4/6/546e370dba726f2153a4da5974e8c569e0f6b740.png)  
Hope you can understand it now, the only thing that is do is check if coins is 100,200,300…  
if not do the timer…  
I don’t understand why the timer is not reset

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 6, 2023, 6:10pm UTC](https://forums.unrealengine.com/t/retriggerable-delay/784915/10 "2023-03-06T18:10:19Z")

</div>

So you have ‘coins’ in the player, and ‘coins sound’ in the game mode? And ‘coins sound’ goes up 1 every 100 ‘coins’?

Can you put the print string right before the delay, and one right after. That way, you know when you’re triggering it, and when the execution comes out the other side.

---

<div class="post-metadata">

**Author:** ![ilailevavi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ilailevavi](https://forums.unrealengine.com/u/ilailevavi)\
**Post date:** [March 6, 2023, 6:40pm UTC](https://forums.unrealengine.com/t/retriggerable-delay/784915/11 "2023-03-06T18:40:17Z")

</div>

there is a Boolean every 100 coins.  
I’m using the coins sound to change sound if i pick up coins in a row. (like subway surfers)  
so what i did was to add 1 coin sound evey time pick up coin and then start timer for 8 sec and then restart the timer to 0. right now the problem is that the timer is set to 0 even if i pick new coin. the retriggerable delay doesn’t restart. when that will work i want to set 1 coin= sound 1 2 coins= sound 2 and so on…

---

<div class="post-metadata">

**Author:** ![ilailevavi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ilailevavi](https://forums.unrealengine.com/u/ilailevavi)\
**Post date:** [March 6, 2023, 6:40pm UTC](https://forums.unrealengine.com/t/retriggerable-delay/784915/12 "2023-03-06T18:40:39Z")

</div>

there is a Boolean every 100 coins.  
I’m using the coins sound to change sound if i pick up coins in a row. (like subway surfers)  
so what i did was to add 1 coin sound evey time pick up coin and then start timer for 8 sec and then restart the timer to 0. right now the problem is that the timer is set to 0 even if i pick new coin. the retriggerable delay doesn’t restart. when that will work i want to set 1 coin= sound 1 2 coins= sound 2 and so on…

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 6, 2023, 7:01pm UTC](https://forums.unrealengine.com/t/retriggerable-delay/784915/13 "2023-03-06T19:01:01Z")

</div>

Did you try the double print string, like I said?

---

<div class="post-metadata">

**Author:** ![ilailevavi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ilailevavi](https://forums.unrealengine.com/u/ilailevavi)\
**Post date:** [March 6, 2023, 11:58pm UTC](https://forums.unrealengine.com/t/retriggerable-delay/784915/14 "2023-03-06T23:58:29Z")

</div>

I fixed to problem 🙂  
the code was on the coin, when I switched it to the character and casting it worked!

---

<div class="post-metadata">

**Author:** ![ilailevavi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ilailevavi](https://forums.unrealengine.com/u/ilailevavi)\
**Post date:** [March 6, 2023, 11:58pm UTC](https://forums.unrealengine.com/t/retriggerable-delay/784915/15 "2023-03-06T23:58:37Z")

</div>

I fixed to problem 🙂  
the code was on the coin, when I switched it to the character and casting it worked!
