reznok / GMCAbilitySystem

An Unreal Engine plugin that adds an ability system to the General Movement Component plugin
MIT License
35 stars 16 forks source link

Add a "Remove All Active Abilities By Class" method on the ASC #16

Closed LeoFabre closed 1 week ago

LeoFabre commented 8 months ago

Title says it all ! Can be useful to have if you activate several abilities that are children of the given class for example.

I might implement this myself later, leaving this as a TODO :)

reznok commented 8 months ago

Similar to GAS, I was planning on adding a way to remove abilities by tag. I believe GAS has a property for Effects that's "Cancel Abilities With Tag".

Packetdancer commented 7 months ago

This should actually be closed out, as RemoveEffectByTag has been in place for a while now!

Packetdancer commented 7 months ago

Wait, I misread this, it's ability and not effect. :|

Aherys commented 6 months ago

Implemented in https://github.com/Aherys/DeepWorlds_GMCAbilitySystem/commit/d814d9ca139bac64ef2d411c48f129ece4b5d988

Aherys commented 6 months ago

Is now PR #64

LeoFabre commented 6 months ago

Is now PR #64

Very cool, thanks !

LeoFabre commented 6 months ago

Looking at the code, it looks like it's by tag and not by class, but actually having it by tag is more powerful.

Aherys commented 6 months ago

There is both.


    UFUNCTION(BlueprintCallable, DisplayName="End Abilities (By Tag)", Category="GMAS|Abilities")
    // End all abilities with the corresponding tag, returns the number of abilities ended
    int EndAbilitiesByTag(FGameplayTag AbilityTag);

    UFUNCTION(BlueprintCallable, DisplayName="End Abilities (By Class)", Category="GMAS|Abilities")
    // End all abilities with the corresponding tag, returns the number of abilities ended
    int EndAbilitiesByClass(TSubclassOf<UGMCAbility> AbilityClass);```