Download

Multiplayer Menue Help

Hi!

Im trying to setup a queue system for players that matches players who want to play.
I intended to maintain a player array of “player states” in queue. Then if 2 or more have been found create a session and put them into it.

As client I have trouble telling the server that I want to be added to the queue. I tried many different variations of replication setup for the events, locations for the events (game mode, game state…) etc… none of wich have worked as I wanted to.

In the widget I ask for the owning player > player state. With that I tried to call a function/event in gamemmode/gamestate that just adds the player state to an array of game states… iwhtout much success.

Can u help me getting on the right track?

here some additional information:

I used the multiplayer shootout example as basis.

In the main menue level (wich currently is the startup) I cast to a game instance and in there I start creating the main menue widget things, with the player controller 0 as the owning player of the widgets.
Now if I tell the server from a widget that I (the client) wants to play - I get the player state and call an event with the player state as param. The event is set to run on server, and it just adds the player state to a “players in queue”.

My PIE settings are 2 players and a dedicated server.

allright i got it sorted out.

i get the player controller in the ui, call a function that is set to run on server, with the controller as input on the player controller, from there i ask the game mode to add me to a queue wich is a run on server function in the gamemode and takes a reference of player controller.