Most basic setup required to get a net multicast function to work?

I’ve been trying to get a net multicast function to fire and I can’t seem to do it no matter what I try. This is the setup I feel like should work, being run from an actor that just inherits from AActor and is being placed into the level:

These are the appropriate settings from the details panel:

277684-capture.jpg

I feel as though this should work and Did Multicast Work should be true on both the server and the client, but it seems to only be the case on the server. Why could this be the case?

1 Like

NetMulticast on begin play will not work.

The reason for this is, that the object doesn’t exist on your clients when it already exists on the server. That means there is no receiver object on your clients and they will not receive anything.

Put the multicast on a key event or something like that and it should work.

Omg you’ve helped me ALOT! Thank you. But how can i call it other than event begin play any idea? Since its about a dungeon creation i can’t put it on a key event. Is there something like an event to check if it is loaded both on clients and server?

PS. if i put delay after the begin play it workds but its not an optimal way to do it

Delay is a dirty hack and will not work 100% of the time.

How long it takes each client to load is dependent on their hardware/software, platform performance etc. So it will vary significantly.

Best solution is to have each client have the controller class call the game mode and report it’s ready. Then have the GM fire an event dispatcher that the controllers bind to.