Gameplay Ability System: Global Cooldown

Hello Unreal friends!
I hope there is someone who is fluid in the Gameplay Ability System who can help me out.

I have two Abilities: one with 1 second cooldown and one with a 5 second cooldown.
I would like to implement a global cooldown of 1 second, so you cant cast both spells instantly one after onather.

But you can just add one Cooldown Effect to a spell, or?
Is their anything that comes with GAS to implement this?

Thx and have a nice Weekend :slight_smile:

One solution is to grant a new GE with the 1 sec CD when you go in CD in yours abiliies.
Then put the 1 sec CD tag as “blocking tag” for the 2 abilities. So you won’t be able to activate them if this tag is present.

2 Likes

Hello, I know this is an old post but here is an example of a GCD implemented with the steps mentioned by Elvlnce above, hope this helps someone!

Create a Gameplay Effect for the GCD (I called mine GE_GlobalCooldown) - In the class defaults of the GE do the following

  • Set Duration Policy to “Has Duration”
  • Change the Scalable Float Magnitude to whatever you want (this is the length of the GCD) - I set mine to 1 second
  • Under Tags → Granted Tags → Added, add a new tag for the GCD (I called mine Ability.GlobalCooldown)

Here is a picture of my setup

You are now done with your Gameplay Effect now let’s move on to using this for an ability. Now I don’t know of a better way of doing this, so every ability you will have to add this if you want it to be on the GCD.

  • Add an “ApplyGameplayEffectToOwner” node right after the “Event ActivateAbility” node and set it to make it look like the image below with the “Gameplay Effect Class” input set to your global cooldown GE:

image

Finally, in the gameplay ability, go to the Tags → ActivationBlockedTags and add the Ability.GlobalCooldown tag. Now when you use that ability, the player will have the tag added to them for the duration of the GE you made and it will be auto removed once the duration is over, thus allowing the player to click the ability again.

One thing that I have not figured out yet is how to show this cooldown in the UI - still working on that one!