I’m looking to create a conditional GE that will only be applied if the level of the original GE is at level 2.
Currently something similar exist with the property ConitionalGameplayEffects
. However, there is no level restriction on it.
Looking at the source code:
As you can see, there is even a comment in there. The only thing left is:
- Add 2 properties to
FConditionalGameplayEffect
,float MinLevel
andfloat MaxLevel
. Should be default initialized to -1 to be backward compatible. - inside :CanApply(), replace the condition with this:
return SourceTags.HasAll(RequiredSourceTags) && (MinLevel < 0 || MinLevel <= SourceLevel) && (MaxLevel < 0 || SourceLevel <= MaxLevel);
Also note I tried to create a class derived from UGameplayEffect and implement it for my project only, but there are too many non-virtual methods to achieve that.