UE5

    [UE5] 커스텀 속성계산2, null 객체생성방법, mmc클래스

    [UE5] 커스텀 속성계산2, null 객체생성방법, mmc클래스

    1. mmc 클래스생성 2. */UCLASS()class AURA_API UMMC_MaxHealth : public UGameplayModMagnitudeCalculation{ GENERATED_BODY()public: UMMC_MaxHealth(); virtual float CalculateBaseMagnitude_Implementation(const FGameplayEffectSpec& Spec) const override;private: FGameplayEffectAttributeCaptureDefinition VigorDef;};// Fill out your copyright notice in the Description page of Project Settings.#incl..

    [UE5] 커스텀 속성계산1, 레벨 구현

    [UE5] 커스텀 속성계산1, 레벨 구현

    1. 기획부서에서 아래와같이 최대체력 요청이 왔다고 가정  2. 실습- 플레이어 : PS내의 레벨을 가짐- 적 : 변수로 레벨을 가짐in PSprivate: UPROPERTY(VisibleAnywhere) int32 Level=1;* 고려사항 : 복제O, 복제될때마다 방송해야됨 -> getlifetimereplicated 재정의해야함, 복제함수 생성해야함UPROPERTY(VisibleAnywhere, ReplicatedUsing=OnRep_Level)int32 Level=1;UFUNCTION()void OnRep_Level(int32 OldLevel);void AAuraPlayerState::GetLifetimeReplicatedProps(TArray& OutLifetimeProps) cons..

    [UE5] 보조속성구현, 주요속성변경시 자동변경

    [UE5] 보조속성구현, 주요속성변경시 자동변경

    1. res up => armor up 구현위해res가 바뀔때마다, armor가 바뀐다구현 : Infinity GE를 만들면 됨 2.캐릭베이스에 Secondary속성추가when사용? : 기본속성에 의존 -> 기본속성이 set된 이후 실행이 바람직함UPROPERTY(BlueprintReadOnly, EditAnywhere, Category = "Attributes") TSubclassOf DefaultPrimaryAttributes; UPROPERTY(BlueprintReadOnly, EditAnywhere, Category = "Attributes") TSubclassOf DefaultSecondaryAttributes; 3. 속성 초기화 함수 구현void AAuraCharacterBase::Initia..

    [UE5] 속성 정의, 보조속성 추가하기

    [UE5] 속성 정의, 보조속성 추가하기

    https://mini-96.tistory.com/456 [UE5] refactor : 속성초기화 DT에서, 속성추가방법1.속성추가방법i) AS에 변수추가, @Getter UPROPERTY(BlueprintReadOnly, ReplicatedUsing = OnRep_Strength, Category = "Primary Attributes") FGameplayAttributeData Strength; ATTRIBUTE_ACCESSORS(UAuraAttributeSet, Strength); UPROPERTY(BlueprintReadOnlmini-96.tistory.com속성추가 방법 따라해서 AS에 추가하자. - 결과 https://github.com/DongHoonYu96/GameplayAbilitySys..

    [UE5] 수정자 Coefficient, pre ,post 이해

    [UE5] 수정자 Coefficient, pre ,post 이해

    1. c,pre,post 계산 예시2. 여러개 예시 3. BP에서 설정방법

    [UE5] GE로 속성 초기화하기 // Cast of nullptr to AuraAttributeSet failed 해결

    [UE5] GE로 속성 초기화하기 // Cast of nullptr to AuraAttributeSet failed 해결

    1. GE클래스로 속성초기화하는 함수 생성DefaultPrimaryAttributes변수가 그 GE임, BP에서 의존성 주입함class UGameplayEffect;UCLASS(Abstract)class AURA_API AAuraCharacterBase : public ACharacter, public IAbilitySystemInterface@@ -32,4 +33,9 @@ class AURA_API AAuraCharacterBase : public ACharacter, public IAbilitySystemInte TObjectPtr AttributeSet; virtual void InitAbilityActorInfo(); UPROPERTY(BlueprintReadOnly, EditAnywhere, C..