Gameplay Cue Applied Twice When Gameplay Ability Is Activated

While working on my current project in UE 5.1.1, I discovered that the Gameplay Cue associated with one of my Gameplay Abilities is getting applied twice to the character that activated the ability.

g_tags

After searching online for a bit, I stumbled across this forum post from last year, created by someone who encountered the same issue in UE 4. It seems that a solution was never found, so I’d like to see if anyone has discovered anything since that previous post.

Here is the Gameplay Cue that I have made:

The Gameplay Effect that triggers it:

And the Gameplay Ability that applies the Gameplay Effect:

seems you do the same thing with me.

i can’t explain more… because the project have a long time.

but u can check my screenshot, also I make a buff. seems that work even I don’t know why now…


and also you can check this setting on gameplayeffect, try to check it false

Sadly, checking “Execute Periodic Effect on Application” false had no effect.

I looked at the sample project from tranek’s GASDocumentation for ideas. In there, a Gameplay Cue is manually applied for the Sprint ability instead of being automatically applied when the Gameplay Effect is added. I tried the same thing in my project and indeed, the Gameplay Cue is only applied once, but this doesn’t work well for duration-based effects like buffs. You’d have to keep close track of the duration, then manually remove the effect and cue when the duration ends.

I am still trying to find a solution here. So far it’s come down to the fact that it’s being replicated after the local prediction happens.

1 Like

It has to do with replication? Interesting…my project’s single-player and I haven’t delved into multiplayer at all, so I would’ve never known.

Let me clarify. My guess is that it’s replication based.

I apply an effect in the ability which triggers a cue. This happens immediately. My cue has a sound effect that plays.

When I add latency to my simulation the second cue fires off after the expected latency which is what leads me to believe it’s replication.

Still trying to figure out how to solve it.

1 Like

I solved the issue by making sure the Server is the only one applying the Gameplay Effect

1 Like

That’s great news, thanks for investigating! I’ll give that a shot next time I’m in the editor.

I’ll just chalk this up to me not knowing what I’m doing, but the gameplay cue is still getting applied twice for me :sweat_smile:

I created a server-only event in the gameplay ability, that applies the effect with a gameplay cue connected. That’s currently the only way I know how to only do something on the server. How did you go about doing it?

In my GameplayAbility I use the HasAuthority node before applying the GameplayEffect (which triggers the Cue)

GameplayAbilities run on both Client and Server so this prevents the Cue from firing twice.

1 Like

That totally makes sense, thanks! Unfortunately, there seems to be something else wrong in my case because the cue is still being added twice. I’ve tried both of these:

Like you, I’m applying the gameplay effect in response to a gameplay event:

The event is sent by an animation notify in one of my montages.

Add Commitabilty and GE cooldown, my friends.

If your game is single player, make sure your AbilitySystemComponent (ASC) replication mode is set to full.
This is the intended replication mode for single player games, as stated on Traneks GASDocumentation.

1 Like

Changing the replication mode on the affected characters has indeed fixed the problem. Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.