You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, there may be an issue with the recommendation in the guide regarding a universal MMC for the ability cost that is referencing a value on the ability class.
I've been using this, and it works when activating an ability. The correct cost for the ability level is deducted, and the ability fails to cast if not enough of the resource exists.
In these methods, the MMC's ability's level is wrong. When I call CanAcitvateAbility, I confirmed that Spec.Level != 1, but the cost checked is always using the level 1 value. This means CanActivateAbility may return an incorrect value (a false positive if the cost at level 1 is less than the current level, or a false negative if the cost at level 1 is higher than the current level.)
I played around with the MMC and determined that Ability->GetAbilityLevel() returns 1 in the above methods, but Spec->Level remains correct both when casting the ability and when checking via CanActivateAbility()/CheckCost()
Hey, there may be an issue with the recommendation in the guide regarding a universal MMC for the ability cost that is referencing a value on the ability class.
The recommended code is as follows:
I've been using this, and it works when activating an ability. The correct cost for the ability level is deducted, and the ability fails to cast if not enough of the resource exists.
The issue seems to be if calling
Or, specifically, just:
In these methods, the MMC's ability's level is wrong. When I call CanAcitvateAbility, I confirmed that
Spec.Level != 1
, but the cost checked is always using the level 1 value. This means CanActivateAbility may return an incorrect value (a false positive if the cost at level 1 is less than the current level, or a false negative if the cost at level 1 is higher than the current level.)I played around with the MMC and determined that
Ability->GetAbilityLevel()
returns 1 in the above methods, butSpec->Level
remains correct both when casting the ability and when checking viaCanActivateAbility()
/CheckCost()
I recommend changing the guide's code to:
Unless you know of a reason when this would be incorrect.
I'd also like to thank you for this incredible guide. It's been an absolute lifesaver using GAS
The text was updated successfully, but these errors were encountered: