Having a strange issue with run on server within gamestate.

My understanding right now is that game state is for things that are changing during the game. So my goal has been to store an array of players who want to get in line to do a 1v1 match.

Anyway in this picture it shows a run on server custom event which is called from the UMG hud when the player presses a Queue for match button in a menu.

Ok so, in order to store an array my understanding is that it needs to be server side otherwise you end up with a bunch of clients who think they are the only ones on the list. I also know that if I want other players to see a UMG widget that shows all players who are currently queued for match the array needs to be in gamestate otherwise it will never be replicated.

So the problem comes up when I try to do a run on server custom event in the gamestate. It simply ignores it. When I place a break point all that happens is the arrow takes a look at it then gives up a step later.

Hmm what is going on here? Does run on server simply not work on game state?

I have figured out the problem.

The issue seems to be that run on server events simply do not work in game state. So the only option is to pipe the event through player controller as a run on server event that calls the game state function. It will then run a game state function on the server and everything should work properly there.

1 Like