Function triggered on replicating variable changes?

Hello is this possible have a method called when ever a replicating property is changed?
I think i read it somewhere but trying to find it but i have been unsuccessful up until now.
Thanks for any help.

You most certainly can do this. It is done through the UPROPERTY() header.

Example:

UPROPERTY(Transient, ReplicatedUsing = OnRep_CurrentWeapon)
	class AFMWeapon* CurrentWeapon;

The RelicatedUsing keyword is what does it and the OnRep_CurrentWeapon is the name of the function you want to call when the variable changes.

Example:

YourClass.h

UPROPERTY(Transient, ReplicatedUsing = MyFunctionToCallOnReplication)
	class SomeClass* SomeVariable;

UFUNCTION()
void MyFunctionToCallOnReplication();

YourClass.cpp

void YourClass::MyFunctionToCallOnReplication(){
    // do the things
}

// don't forget to add it to your replicated props!!
void YourClass::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const {
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

    DOREPLIFETIME(YourClass, SomeVariable);

}

Now, there are many options for replication and for the conditions to use in the GetLifetimeReplicatedProps function.

Basic Replication Info

Also, the bottom of THIS page has links to all the reflection (UPROPERTY, UFUNCTION, etc) information.

Hopefully that gets you going!

It most certainly do thank you for the great answer.