How do I Disconnect and then reconnect in multiplayer plugin

Get help using Construct 2

Post » Sun Nov 27, 2016 2:24 pm

I am converting a game to multiplayer and everything is fine, but when my player dies and i want to restart and again connect to signalling server and auto join a room, the on join room call back never happens, It only works if i reload the browser.

What I am doing is
on player death -> leave room->disconnect from signalling server->Restart Layout

But on restart the game connects to server successfully, Logging in is also successful but doesn't joins a room,
I have tried both join room and auto-join room.

The main thing is that on reloading the browser window it works fine again, but reloading the layout doesnt work.
And i also do the Reset Global Variables.
Posts: 1
Reputation: 177

Post » Sun Nov 27, 2016 4:37 pm

Your capx would be very helpful here.

Anyways. You should probably give the client some time to disconnect from the server before restarting the layout.
If that doesn't work, I'll need your .capx for further investigation.
Since your game apparently connects normally when you start it first, there doesn't seem to be an issue with your code.
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
Posts: 528
Reputation: 7,091

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests