Gameplay execution Calculation

Hey everyone.

I am using the Gameplay Ability System with blueprints, got some plugins that expose a lot of the C++ as functions etc.

But im struggling trying to get Gameplay Execution Calculations to work with what I want. Perhaps I am using it wrong.

Currently I have a crit roll done outside of the GEC, but I want to move it inside, however my damage number rely on the damage magnitude and a boolean for if it crits.

But I can’t seem to figure out how to do this with GEC, if it’s even possible. What is the correct way to do this? Any functions I should expose.

You can use setsetbycallermagnitude (in c++ or BP) and getsetbycallermagnitude to pass float vars around and use them however you want in the GEC. convert your bool to a float to pass it.

float CritDamage = Spec.GetSetByCallerMagnitude(FGameplayTag::RequestGameplayTag(FName("Data.CritDamage")), false, 0.0f);