PostAttributeBaseChange not called when Initing the attribute

I have character where I have all of the initial attributes values are stored inside curve table, and thoose values are set for attribute using attribute accessors

void ATestCharacter::InnitAttributes()
{
	MovementAttributeSet->InitMovementSpeed(MovementSpeedBaseRowHandle.Eval(1,MovementSpeedBaseRowHandle.RowName.ToString()));
}

It works fine, it does change attribute

However, what it doesn’t do, is it isn’t calling PostAttributeBaseChange - which i need because i have setup in my Attribute Set For Setting up movement speed

void UMovementAttributeSet::PostAttributeBaseChange(const FGameplayAttribute& Attribute, float OldValue,
                                                    float NewValue) const
{
	Super::PostAttributeBaseChange(Attribute, OldValue, NewValue);

	UpdateMovementValues(Attribute,NewValue);
}

But, the method above isn’t called when using Init function

Am I’m missing something? Or this method is only called when modyfing attribute with Gameplay Effect?

Ok, so seemingly when calling SetAccessor the PostAttributeBaseChange

void ATestCharacter::InnitAttributes()
{
	MovementAttributeSet->SetMovementSpeed(MovementSpeedBaseRowHandle.Eval(1,MovementSpeedBaseRowHandle.RowName.ToString()));
}

In that case, I’m not sure what is the difference between GAMEPLAYATTRIBUTE_VALUE_INITTER(PropertyName) and GAMEPLAYATTRIBUTE_VALUE_SETTER(PropertyName)

Inits shouldn’t fire the delegates as nothing should be modifying the default initial values. This avoids issues where you init and your game does weird stuff with it (when it shouldnt).

1 Like

Ok, i just need to changover my way of doing things then - in that perspective it makes a bit more sense - thx :slight_smile: