CharacterStatusComponent {{ currentPage ? currentPage.title : "" }}

CharacterStatusComponent

Purpose: Add basic variable attributes such as health, endurance, and weight to characters, as well as fixed attributes such as melee attack power, attack speed, and armor. Add experience points, levels, and custom allocation attributes to add points

  • How to add new status:

  • Custom/UltimateStatusEnum.h add StatTest to EAbilityStatType

  • GAS/UltimateAttributeSet.h add code to UUltimateAttributeSet

    UPROPERTY(BlueprintReadOnly, Category = "StatTest",ReplicatedUsing = OnRep_StatTest)
    FGameplayAttributeData StatTest;
    ATTRIBUTE_ACCESSORS(UUltimateAttributeSet, StatTest)

    UFUNCTION()
    virtual void OnRep_StatTest(const FGameplayAttributeData& OldValue);

//If it is a variable attribute, add the following code, and the maximum attribute name should be Max+attribute name
    UPROPERTY(BlueprintReadOnly, Category = "MaxStatTest",ReplicatedUsing = OnRep_StatTest)
    FGameplayAttributeData MaxStatTest;
    ATTRIBUTE_ACCESSORS(UUltimateAttributeSet, MaxStatTest)

    UFUNCTION()
    virtual void OnRep_MaxStatTest(const FGameplayAttributeData& OldValue);
  • Add newly added attributes to DT_ CharacterStatus (requires self creation),and Character->StatusComponent->DefaultStatsTable to set

{{{ content }}}