# Is it OK to add a TimerByEvent in a Gameplay Ability?

**URL:** <https://forums.unrealengine.com/t/is-it-ok-to-add-a-timerbyevent-in-a-gameplay-ability/2685888>\
**Category:** Blueprint\
**Tags:** unreal-engine, Blueprint, CPP, question\
**Created:** [December 18, 2025, 1:02am UTC](https://forums.unrealengine.com/t/is-it-ok-to-add-a-timerbyevent-in-a-gameplay-ability/2685888 "2025-12-18T01:02:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AllGamesSuck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AllGamesSuck](https://forums.unrealengine.com/u/AllGamesSuck)\
**Post date:** [December 18, 2025, 1:02am UTC](https://forums.unrealengine.com/t/is-it-ok-to-add-a-timerbyevent-in-a-gameplay-ability/2685888/1 "2025-12-18T01:02:24Z")

</div>

I’m asking because AI says no. But I cannot implement my own C++ Ability Task. I’m not a coder.

I’m trying to run a Line Trace on every tick, basically, to look for actors/components with a certain interface.

Thanks.

---

<div class="post-metadata">

**Author:** ![jwatte](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jwatte/32/744941_2.png) [@jwatte](https://forums.unrealengine.com/u/jwatte)\
**Post date:** [December 18, 2025, 1:24am UTC](https://forums.unrealengine.com/t/is-it-ok-to-add-a-timerbyevent-in-a-gameplay-ability/2685888/2 "2025-12-18T01:24:01Z")

</div>

You might want to put that sensor in a component on the owning pawn, as a line trace (or maybe even better, a capsule trace) and sense the overlap events from that component.

This will be more efficient, because it’s run as part of overall collision detection, not as a separate afterthought separate from the physics step.

---

<div class="post-metadata">

**Author:** ![AllGamesSuck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AllGamesSuck](https://forums.unrealengine.com/u/AllGamesSuck)\
**Post date:** [December 18, 2025, 1:30am UTC](https://forums.unrealengine.com/t/is-it-ok-to-add-a-timerbyevent-in-a-gameplay-ability/2685888/3 "2025-12-18T01:30:48Z")

</div>

Thanks. Lyra documentation says they made the interaction system using the Gameplay Ability System. So I was trying to grant an ability to the player that traces for interactables. But AI said it’s a bad idea to put a Timer in a Gameplay Ability.  
So, I should just put that logic on a component instead, and ignore GAS on that one, right?

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [December 18, 2025, 5:38am UTC](https://forums.unrealengine.com/t/is-it-ok-to-add-a-timerbyevent-in-a-gameplay-ability/2685888/4 "2025-12-18T05:38:55Z")

</div>

> [@AllGamesSuck](#):
>
> But AI said it’s a bad idea to put a Timer in a Gameplay Ability.

cant see i problem with it myself, in a lot of ways it makes sense as you can interact with it, ie other abilities can block/cancel interactions

---

<div class="post-metadata">

**Author:** ![dZh0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dZh0](https://forums.unrealengine.com/u/dZh0)\
**Post date:** [December 18, 2025, 9:42am UTC](https://forums.unrealengine.com/t/is-it-ok-to-add-a-timerbyevent-in-a-gameplay-ability/2685888/5 "2025-12-18T09:42:23Z")

</div>

> [@AllGamesSuck](#):
>
> I’m trying to run a Line Trace on every tick, basically, to look for actors/components with a certain interface.

This is usually done by a separate “vision” or “sensor” component as @jwatte pointed out. This way you can make the component tick every half a second (instead of every frame) which will decrease your computational load at least x15 with negligible impact on game-play. It will also allow further optimizations managing its tick interval depending on your game.

If you want to tie that to a Gameplay Ability just make the ability add a tag and notify the component to start ticking. Make the component turn itself off when this tag is removed.

Making it all in an ability is not entirely out of the question but it makes it harder to implement, support and modify down the line.

---

<div class="post-metadata">

**Author:** ![AllGamesSuck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AllGamesSuck](https://forums.unrealengine.com/u/AllGamesSuck)\
**Post date:** [December 18, 2025, 12:01pm UTC](https://forums.unrealengine.com/t/is-it-ok-to-add-a-timerbyevent-in-a-gameplay-ability/2685888/6 "2025-12-18T12:01:53Z")

</div>

> [@dZh0](#):
>
> This way you can make the component tick every half a second (instead of every frame)

Thank you. I tried that, but I find it too slow if it’s not on tick. I’m displaying a crosshair everytime the player looks at an interactable, else the crosshair is hidden.

> [@dZh0](#):
>
> If you want to tie that to a Gameplay Ability just make the ability add a tag and notify the component to start ticking

Yeah, that would be it. But I wanted to avoid using 2 entities to do one job. I thought it’d be less scalable.

AI says I should put it in an Ability Task, but that can only be done in C++. I got AI to write it for me, but it doesn’t work.

---

<div class="post-metadata">

**Author:** ![dZh0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dZh0](https://forums.unrealengine.com/u/dZh0)\
**Post date:** [December 18, 2025, 1:05pm UTC](https://forums.unrealengine.com/t/is-it-ok-to-add-a-timerbyevent-in-a-gameplay-ability/2685888/7 "2025-12-18T13:05:44Z")

</div>

Yea, you are right - I was distracted and I thought the trace doesn’t come from the player. In your case tracing on every frame is the better approach.

BTW if TimerByEvent in the Gameplay Ability works in your cases - go for it.

It is often better to implement something “somehow“ and go on with your prototyping instead of getting bogged down in the details. (IMPORTANT NOTE: This advice does **NOT** apply to production code!)

I’m a bit rusty on the Gameplay Ability System but I can share the best documentation I’ve ever used for it:

> **[GitHub - tranek/GASDocumentation: My understanding of Unreal Engine 5's...](https://github.com/tranek/GASDocumentation?tab=readme-ov-file#concepts-at)**
>
> My understanding of Unreal Engine 5's GameplayAbilitySystem plugin with a simple multiplayer sample project.

I hope it helps you write your Ability Task if your initial approach doesn’t work.
