GAS: Infinite passive ability activating effect

Hey,

I am playing with GAS and thinking how to properly implement infinite passive ability that activates some effect when some criteria are met.

For example, let’s take a Teemo’s passive from League of Legends. If I stay still for a 3 seconds, I become invisible.

At this moment, I have this ability implemented as an active ability. I can activate it by pressing E. This is how I’ve done this:

  1. Pressing E activates GameplayAbility,
  2. GameplayAbility gives me GameplayEffect,
  3. GameplayEffect lasts 3 seconds and gives me Invisible GameplayTag,
  4. Invisible GameplayTag activates reliable GameplayCue, which makes me invisible.

I know GameplayCue may not be good option for making character invisible as gameplay shouldn’t rely on GameplayCues, right? Let me know what you think.

Back to the actual question, what would be a recommended way to implement similar ability but as a passive ability that activates after character not moving for a 3 seconds?

A GameplayAbility that is activated at the beginning, lasts forever, checks if player is moving and activates effect after 3 seconds?

Or maybe using GameplayEffect somehow? Resetting duration when character moves and activating invisible GameplayEffect somehow when the first one ends?

GAS heavily relies on gameplay tags. if you can track moment using player’s input: move forward /right are equal to zero, start a timer or delay, after 3 sec, you can check speed. if speed is zero, “add loose gameplay tag”, if not, “remove loose gameplay tag”. your GE should be “activated by target tag”.

Hope that makes sense.