May 2, 2022, 1:54pm
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?
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
May 3, 2022, 11:22am
thank you markus, that works inside a gameplay ability blueprint using target self for making the spec
now i just need to figure out how to get a target gameplay ability in a different blueprint
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