Hi, I use the session nodes in the most simple way but nothing is working as it is supposed to do. I got a relly simple setup (I didn’t set up a HUD etc):
Session handling is pretty simple, the “Join” and “Host” Event are called from the Widget I create and remove in the top left corner of the blueprint. So, to sum it up: Button 1 will cause the GameInstance to fire “Host session” and remove the Widget afterwards. Button 2 combines Search and join: first it searches for session and (JUST) if it finds one, it will connect to it via “join Session”. After the widget is removed, I want to get my GameState (as far as I understood this beautiful thing, there is only one GameState for everyone in one session).
Than I wanted to test 3 things to share information between client and server:
I print the amount of [my custom] Pawn-Actors I can find. It should be the amount of guys connected to the same session, because everybody got his Pawn in everbodys game.
Second: If I hit c (see in Pawn-Blueprint above), I spawn an actor (simple sphere mesh in this case). This actor got the propertys “replicates”, “always relevant” and “replicates movement”. So all guys in the session should be able to see this nice sphere spawning and stucking in the ground of my map, because I was to lazy to let it spawn a couple of units higher…
Joke aside, third: I call a function (that is running on the server), thats tells my GameState to call a dispatcher. This dispatcher is bound after I join a session and get the GameState (in the GameInstance-Blueprint). This Dispatcher fires a simple print (“test”) on the server.
if I try this in the preview (I set number of players on 2 and hit “play”) everything is nice: If connected, the client will say that he found 2 pawns on the map, if I hit c on the client, the server says “test” and both windows show the sphere.
if I package this almost nothing works. In the first window I host a session, in an other one I attempt to join. The second window says, that it found a (1) session after a few seconds and the Widget dissappears (This does not happen, if I did not host a session before). So the second window finds a session and joins (at least that’s what I would guess because I just let the Widget dissappear after the Search and Join Nodes executed the “On success” output).
After the widget dissappeared, the “connected” guy calls that he found only 1 Pawn, if I hit “c” the sphere-spawn and the “test”-call will just happen in the window where I hit c. It’s like there is no connection at all.
I changed my DefaultGame.ini by adding
(also tried Null instad of LAN), but that didn’t help.
Sorry for the long post, wanted to give as many details as possible. I hope you can help me