# Delays Continue Counting When Game Is Paused

**URL:** <https://forums.unrealengine.com/t/delays-continue-counting-when-game-is-paused/373393>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [October 15, 2016, 9:14am UTC](https://forums.unrealengine.com/t/delays-continue-counting-when-game-is-paused/373393 "2016-10-15T09:14:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![w0hoho](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@w0hoho](https://forums.unrealengine.com/u/w0hoho)\
**Post date:** [October 15, 2016, 9:14am UTC](https://forums.unrealengine.com/t/delays-continue-counting-when-game-is-paused/373393/1 "2016-10-15T09:14:51Z")

</div>

Hello. I set the skill cooldowns in my game with delays. When I open in game menu when a skill is on cooldown, delay continue to count. I set the game paused in menu. How can I pause the counting?

Thanks.

---

<div class="post-metadata">

**Author:** ![w0hoho](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@w0hoho](https://forums.unrealengine.com/u/w0hoho)\
**Post date:** [October 15, 2016, 7:16pm UTC](https://forums.unrealengine.com/t/delays-continue-counting-when-game-is-paused/373393/2 "2016-10-15T19:16:27Z")

</div>

Can anyone help?

---

<div class="post-metadata">

**Author:** ![R0tn3k](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@R0tn3k](https://forums.unrealengine.com/u/R0tn3k)\
**Post date:** [October 15, 2016, 8:13pm UTC](https://forums.unrealengine.com/t/delays-continue-counting-when-game-is-paused/373393/3 "2016-10-15T20:13:53Z")

</div>

how do you make the delay? if you just take the deltaseconds at the start of the cooldown how about you then add every new second one to the cooldown with a boolean-check (something along “IsInMenu”) so it only counts one up, when you’re not in the menu. If you do it someway else, maybe make a screenshot? that would help 🙂

---

<div class="post-metadata">

**Author:** ![w0hoho](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@w0hoho](https://forums.unrealengine.com/u/w0hoho)\
**Post date:** [October 15, 2016, 8:18pm UTC](https://forums.unrealengine.com/t/delays-continue-counting-when-game-is-paused/373393/4 "2016-10-15T20:18:07Z")

</div>

Yes that makes sense but I used simple ‘delay’ node. This will cost lots of work, ha? 🙂

---

<div class="post-metadata">

**Author:** ![R0tn3k](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@R0tn3k](https://forums.unrealengine.com/u/R0tn3k)\
**Post date:** [October 15, 2016, 8:59pm UTC](https://forums.unrealengine.com/t/delays-continue-counting-when-game-is-paused/373393/5 "2016-10-15T20:59:34Z")

</div>

well, with delay I don’t think it will work. The easiest way comming to my mind would probably be on event tick take the delta-seconds and add them to the cooldown(or subtract them) but with the mentionend boolean gate before - I’m not sure if its the most efficient way, but I guess it should at least work ^^  
Edit: just tried a simplified version of this in a third-person-template and yeah, it works ^^
