Hello again AHub community , I am back again with another question. This time, I have a function for capturing a Flag, which already works on the Server and when I pick up the flag with the Client it just kinda pushes it away, although on the Server version the client does have the flag on him. I am having trouble replicating this function into the client so he also sees the flag attached. I am thinking it might have something to do with replicating the variables used for the function parameters or for the conditions to be met. Here what I have so far in code:
H.
UFUNCTION(Server, Reliable, WithValidation)
void AttachFlagToBlue(class ADisengageCharacter* OtherActor, FName InSocketName);
bool AttachFlagToBlue_Validate(class ADisengageCharacter* OtherActor, FName InSocketName) { return true; }
Cpp.
void AFlag::AttachFlagToBlue_Implementation(ADisengageCharacter* OtherActor, FName SocketName)
{
}
Not sure if I should replicate the “PickUp” function which calls the Attach function I am replicating aswell.
Thanks in advance ! and I apologize since I’m pretty new with Networking.