使用GameplayEffect初始化属性值-ApplyGameplayEffectSpecToTarget
摘要:example: UPROPERTY(BlueprintReadOnly,EditAnywhere,Category = "Attributes")TSubclassOf<UGameplayEffect> DefaultPrimaryAttributes; void InitializePrimar
阅读全文
posted @
2025-08-27 15:24
偷懒的阿贤
阅读(7)
推荐(0)
在属性变化时-PreAttributeChange
摘要:virtual void PreAttributeChange(const FGameplayAttribute& Attribute, float& NewValue) override;exmple: void UAuraAttributeSet::PreAttributeChange(cons
阅读全文
posted @
2025-08-27 14:28
偷懒的阿贤
阅读(10)
推荐(0)
对于属性集中属性变化的回调委托
摘要:DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnHealthChangedSignature, float, NewHealth);DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnMaxHealthChang
阅读全文
posted @
2025-08-26 17:57
偷懒的阿贤
阅读(6)
推荐(0)
查询GE上携带的所有Tag-GetAllAssetTags
摘要:FGameplayTagContainer TagController;EffectSpec.GetAllAssetTags(TagController); for (const FGameplayTag Tag : TagController){ //TODO: Broadcast the tag
阅读全文
posted @
2025-08-25 22:28
偷懒的阿贤
阅读(4)
推荐(0)
AbilitysystemComponent在出发GE效果时的回调委托-OnGameplayEffectAppliedDelegateToSelf
摘要:OnGameplayEffectAppliedDelegateToSelfexample: public: void AbilityActorInfoSet();protected: void EffectApplied(UAbilitySystemComponent* AbilitySystemC
阅读全文
posted @
2025-08-25 22:27
偷懒的阿贤
阅读(9)
推荐(0)
在GE执行到最后阶段的,执行的数据查询-PostGameplayEffectExecute
摘要:virtual void PostGameplayEffectExecute(const struct FGameplayEffectModCallbackData& Data) override; example 1: Data.EvaluatedData.magnitude//记录GE过程值的差
阅读全文
posted @
2025-08-22 10:38
偷懒的阿贤
阅读(5)
推荐(0)
获取GAS组件-GetAbilitySystemComponent
摘要:virtual UAbilitySystemComponent* GetAbilitySystemComponent() const override;
阅读全文
posted @
2025-08-21 23:00
偷懒的阿贤
阅读(6)
推荐(0)
设置GAS组件的拥有者和生效者-InitAbilityActorInfo
摘要:AbilitySystemComponent->InitAbilityActorInfo(Owner,AvatarActor);
阅读全文
posted @
2025-08-21 22:58
偷懒的阿贤
阅读(16)
推荐(0)
playerState的网络回调-OnRep_PlayerState
摘要:virtual void OnRep_PlayerState() override;example: void AAuraCharacter::OnRep_PlayerState(){ Super::OnRep_PlayerState(); InitAbilityActorInfo();}
阅读全文
posted @
2025-08-21 22:56
偷懒的阿贤
阅读(7)
推荐(0)
设置GameplayEffectReplicationMode-SetReplicationMode
摘要:AbilitySystemComponent->SetReplicationMode(EGameplayEffectReplicationMode::Mixed);// Minimal//只复制GE,不适合用于AbilitySystemComponents Mixed//仅将最小的游戏效果信息复制到
阅读全文
posted @
2025-08-21 22:53
偷懒的阿贤
阅读(11)
推荐(0)
对属性集中的属性需要做到的固定宏-ATTRIBUTE_ACCESSORS
摘要:1 对属性集中的属性,在值变化时的回调 example: UFUNCTION()void OnRep_Health(const FGameplayAttributeData& OldHealth) const; void UAuraAttributeSet::OnRep_Health(const F
阅读全文
posted @
2025-08-21 22:41
偷懒的阿贤
阅读(5)
推荐(0)
注册需要复制的GAS属性集中的属性
摘要:virtual void GetLifetimeReplicatedProps(TArray <FLifetimeProperty>& OutLifetimeProps) const override; example: void UAuraAttributeSet::GetLifetimeRepl
阅读全文
posted @
2025-08-21 22:36
偷懒的阿贤
阅读(6)
推荐(0)
更改属性集的值,做夹值处理
摘要:virtual void PreAttributeChange(const FGameplayAttribute& Attribute, float& NewValue) override; void UAuraAttributeSet::PreAttributeChange(const FGame
阅读全文
posted @
2025-08-21 20:40
偷懒的阿贤
阅读(6)
推荐(0)
移除AbilitySystem组件上的GameplayEffecct
摘要:bool UAbilitySystemComponent::RemoveActiveGameplayEffect(FActiveGameplayEffectHandle Handle, int32 StacksToRemove)
阅读全文
posted @
2025-08-21 17:55
偷懒的阿贤
阅读(4)
推荐(0)
获取GameplayEffect的效果类型
摘要:EffectSpecHandle.Data.Get()->Def.Get()->DurationPolicy
阅读全文
posted @
2025-08-21 17:52
偷懒的阿贤
阅读(3)
推荐(0)
将GamplayEffect,放置生效在AbilitySystem组件上
摘要:FGameplayEffectContextHandle EffectContextHandle = TargetASC->MakeEffectContext();EffectContextHandle.AddSourceObject(this);FGameplayEffectSpecHandle
阅读全文
posted @
2025-08-21 17:52
偷懒的阿贤
阅读(8)
推荐(0)
获得Actor上的AbilitySystem组件
摘要:UAbilitySystemBlueprintLibrary::GetAbilitySystemComponent(TargetActor);
阅读全文
posted @
2025-08-21 17:51
偷懒的阿贤
阅读(7)
推荐(0)