GamestateBase - Client unable to call a Run on Server Custom Event

Hi there!

I’m having a bit of an issue with a client calling a Run on Server Custom Event inside a GameStateBase blueprint. Everything works wonder when running as the server. I’ve also tried moving everything to the PlayerController with no issues. Now I am aware that there is GameState which is used for multiplayer, but due to the description of GameStateBase being ‘‘GameStateBase is a class that manages the game’s global state, and is spawned by GameModeBase. It exists on both the client and the server and is fully replicated’’. I thought I might get away with it.

My questions.
Is what I desire possible, and if so, how?
If not, would GameState work?

Thank you and have a good one. :slight_smile:

You don’t use Game State for game logic/functionality. It’s more for holding/replicating general game state information. Like Score, Player Health etc.

I understand.
Thanks for the quick reply!

You can simply code it directly into the class that’s dropping it.

Use Switch on Authority → Server RPC

When you package the game anything that runs on server isn’t packed with the client version. Only the servers version of the class will include the server code.