Download

RPCs with Event Tick

Do you feel it would be safe to have RPC checks on tick events? I currently have 4 RPCs connected to my tick event, which seems to work fine, but I feel as if this it not the correct approach for RPCs.

For example: I am doing an RPC on a player holding shift to run (I’d rather have an RPC because then running could be cheated), and this RPC is doing a check on event tick event, which I feel is a little too much. Perhaps this would cause network congestion if multiple people are on? So do you feel I should add a delay to this tick event? Or perhaps create a custom event that is called after x seconds has passed. Any opinions and suggestions on this would be awesome.

Thanks.

I’m no pro and still a beginner like you. However I wouldn’t think that I would use the Tick event in combination with RPC calls. Your RPC call should be used to start some action like the tick event. RPC standing for Remote Procedure Call. You use an RPC as something that you fire an event on. An RPC is not something that you would constantly be sending data on. Instead for that you would use one of the other networking concepts such as replication.

The problem with this, is if I simply replicate the running variable and not protect it to execute on the server, then any old joe can simply modify the client to cheat and run faster than the limit and possibly forever. So I am trying to prevent a client from cheating the run system but the only thing I can see is to add an event thats executed on the server every so x seconds for this, which I would assume I would do in the tick event with a delay.