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:
- Pressing E activates GameplayAbility,
- GameplayAbility gives me GameplayEffect,
- GameplayEffect lasts 3 seconds and gives me Invisible GameplayTag,
- 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?