How to apply lyra gameplay effect with magnitude in blueprint?

hello i want to call applygameplayeffecttoself or applygameplayeffecttotarget like this in the lyra starter game

it works for some gameplay effects but not ones with execution calculation modifier magnitude set by caller

example in lyra: GE_Heal_SetByCaller

when i run it gives me this error:
LogAbilitySystem: Error: FGameplayEffectSpec::GetMagnitude called for Data SetByCaller.Heal on Def Default__GE_Heal_SetByCaller_C when magnitude had not yet been set by caller.

how do i set the magnitude?

Hello there :wave:

I struggled with this myself in the beginning:
What you need to do is call Make outgoing gameplay effect spec
On that you can call Assign set by caller magnitude

Then you just apply the effect spec you just created and set the magnitude on.

Make sure that in DataTag you set the same as in your Gameplay Effect and it should work :+1:

Greetings,
Markus
Bagpack Games

1 Like

For that you just need to get the gamplay ability system from the character that has the component (like in your tick function above just except from self use the character) and use that as a target :wink:

Greetings,
Markus
Bagpack Games

1 Like