Hi guys, I’m noob 2 months into coding (or blueprinting) my game, I got a question
Events from UI clicking are ‘visible’ only to local player therefore I need to use Run on server alot
(e.g. click on buy item → Buy event (run on server, reliable). it checks if player can afford item and adds it to inventory etc)
But everywhere I read RPCs are EVIL, and players will be kicked left and right with reliable option
So is there another way without using run on server?
You need to use RunOnServer RPC’s in this case just don’t make it reliable. When you press a button don’t assume anything will happen but wait for a callback from the server with the result.
Unreliable RPC’s are actually very reliable except when you have some saturation caused by bugs which shouldn’t be resolved with Reliable RPC
You should build the UI to handle dropped RPC’s gracefully so the user can press the button again if nothing happened the first time.