GameplayAbilities and you

Hi and everybody else!

Quick question, trying to figure out if I’m missing something…

When I simulate lag (say, 500ms) and apply a GameplayEffect to a Character, the client seems to wait 500ms before executing the GameplayCue. For example, if I have a hitreact animation that is supposed to play on the HitReact gameplaycue, there is a delay between the effect being applied and the cue executing proportional to the simulated lag.

This seems incorrect, since GameplayCues are meant to be cosmetic events. Does anybody know how to fix this? Basically what I want is for the client to execute the cue the moment that the GameplayEffect is applied, otherwise the visual feedback feels sluggish and unresponsive.

I thought of simply “executing” the effect in the GameplayAbility BP but as far as I can tell, that’s only possible if you’re executing a cue on the GameplayAbility’s owning Actor.

Any help would be greatly appreciated.

Hey!
Maybe someone can help me here, having a problem in 4.21 trying to get the basic Setup running.

I can’t get the “Hello.” to print in my Blueprint, though it seems that Ability is NULL for me.

if I put a Log inside
if (HasAuthority() && Ability) it never gets called, using just HasAuthority gets me a log but
AbilitySystem->GiveAbility(FGameplayAbilitySpec(Ability.GetDefaultObject(), 1, 0)) then crashes the game.
(I guess because it would try to get Ability, which seems to be NULLPTR as mentioned above.)

For the Ability Component to work I just have to put

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Abilities)
TSubclassOf<class UGameplayAbility> Ability;

inside my Character Header file, right?

I’ve checked multiple times for typos etc. but the code compiles fine and I can’t spot any difference to the tutorial code. Maybe someone has an idea? Can share the .cpp and .h if it would help :slight_smile:

Thanks in advance!

Yeah I am using this bc the other doesn’t seem to exist?

Chiming in here, I’m in the exact same boat and don’t know how to progress from here.

For those of you that have NULL as the ability, did you assign the GameplayAbility blueprint that you created to the ‘Ability’ parameter on the Character in the editor?

These templates are deprecated and will be getting removed.

Has anyone figured out why WaitInputRelease only works for the first mapped input? No matter how many different projects I create, Wait Input Release only works for the first mapped input. Confirmed bug?

including AbilitySystemComponent.h worked for me


include “AbilitySystemInterface.h”
include “AbilitySystemComponent.h”

Thanks dude!

For other following along, there’s a missing step. You need to go to the in-game character blueprint and assign the ability we created to the character (which is searched for in the code).

Since the old wiki is now gone, the link to the forum post no longer works. Luckily some people have reposted the old wiki, so here’s a link to a repost of the original forum post by KZJ:
https://nerivec.github.io/old-ue4-wiki/pages/gameplayabilities-and-you.html

I’m using Gameplay Ability System and so far everything has been more or less smooth sailing. I just found a bug though, and hopefully someone can help me here.

I have a backing attribute of “AttackDamage” for my damage effect. My strength increases and also increases my attack damage. I set a tick that updates my strength every few seconds. I can see both my strength and attack damage increase with this tick function exactly like they should.

The problem comes when I call the ability. If I activate the ability for the first time while my Attack damage is say 85, it deals 85 damage just as it should. The problem is, once the ability is activated, it hard sets that damage at 85. Basically, my attack damage continues to increase, but the ability damage stays at 85.

I enjoy playing around with this system and learning as much as I can, but finding help on the web for this system is kind of tough. Hoping someone here can help me out.