Does NetMulticast only work from the server?

I’ve been experimenting with NetMulticast, and if I call a NetMulticast function from a client then it only gets called locally, and does not run on any other client or the server.

If I add a server function that then called the multicast function, then the function gets called locally on the server as well as on all the clients.

Is this correct, that the only way to call a NetMulitcast function is from the server?

In which case, in order to get a function called on every client and server, you need to implement two functions - one to run one the server and the other to be multicast?

Yes that is the intended behavior. In order for a client to interact with another client it must go through the server first. This piece of documentation explains it well.

so essentially we are really implementing 4 functions total (implementation, validate, netmult,etc). Am I correct in saying this?

Yes, that’s what I did. In fact, to get a single function multicast from the client I needed 8 functions in total!

If you are wanting a client to broadcast a message to all other clients then yes. You would need at least 4 functions. The Server Implementation, Validation and the NetMulticast Implementation and Validation.

Ok, so the answer is yes! - Points to Zaucy but I can’t select that comment as a correct answer for some reason.

You don’t need the validation if you are not using it. The Validation function can be used to stop the whole call when it returns false. If you are only putting “return true” in it, you don’t need it and you can only work with Implementation and drop the WithValidation parameter from the UFUNCTION macro.

Hi,
Please wrote those four functions here.
I have a function that called from Animation Blueprint and it’s just only run on client owner and server and not on other client,
I want to know how i can call it on other clients ? I get an error about no owning connection for that function.
This is my code:

.h

UFUNCTION(BlueprintCallable, Category = "Animation")
void EndAttack();

	UFUNCTION(Reliable, Server, WithValidation)
	void ServerEndAttack();
	void ServerEndAttack_Implementation();
	bool ServerEndAttack_Validate();

.cpp

void AMyClass::EndAttack()
{
	
	if (Role < ROLE_Authority)
	{
		ServerEndAttack();
	}
}

void AMyClass::ServerEndAttack_Implementation()
{
	EndAttack();
}

bool AMyClass::ServerEndAttack_Validate()
{
	return true;
}

No. Yes and No.

No - because it will work on client, but only for the calling client
Yes - because in order for all the rest to get that too, it should be called from the server.

So pretty much it depends on what you intend to do.

This answer is to unconfuse rapid readers who would otherwise think it wont work on the calling client

Actually now the validation is forced for Server functions.
This was made so developers don’t forget to use it.
In case you don’t need special validation functionality, just return true from the _validate function.