Download

Networking - better way to update Clients than update on Tick?

Hello!
Me and a friend have begun a small Multiplayer project for fun and everything is working fine. However we began wondering if there’s a better way to push an event that a client does to the other clients.
Currently we’re doing it like this:


So the player makes the input to Sheath the weapon - which registers on the server. Then we have a Custom Event from the Event Tick that checks whether the weapon is visible or not (every tick) that runs on the clients
This works.

What we’re wondering is if there isn’t a better way, surely having the clients check if their info is the same as the servers on tick must be wasteful, is it possible to make it so that after the player makes the input, the server registers and sends the info to all the clients to run the function? - All tries to do it like this doesn’t work over network for us…

Did you tried “Rep notify” for variables? If you change variable on server it will replicate and run “ONChane” function for that variable on client side.

Doing all actions trough server will cause annoying delays if client is lagging.

Ah, thanks:) Got Rep Notify to work now and it is exactly what I wanted. Wonder what I did wrong first time I tried it…

Thanks!