How do I change host position in a chat room?

Get help using Construct 2

Post » Sun Jan 08, 2017 8:09 pm

Hi, I'm talking about the Multiplayer chat template in the C2 examples. Is there any way to implement a system where when the host leaves the game, another player gets the host position? It is to prevent that the peers get kicked from the chat whenever the host leaves the game.
Tank you :)
B
20
S
6
Posts: 143
Reputation: 1,666

Post » Sun Jan 08, 2017 9:23 pm

I'm not 100% sure, but I think that this is already the way it works.
When the host leaves the room, a different player becomes the host.

Either this is the case or there is no way to change the host, since there isn't any action that does this.
So if it doesn't happen automatically (which I assume), there is no way to do it (yet?).
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091

Post » Mon Jan 09, 2017 1:45 pm

@randomly No, it doesn't work this way. When the host leaves the room, peers get kicked from the room.

I think there might be a way, because in the tutorial's comments someone wrote many years ago he had been able to implement this system.

Anyway, if it is not possible, is there any other way to prevent players being kicked from the chat room whenever the host logs out?
B
20
S
6
Posts: 143
Reputation: 1,666

Post » Tue Jan 10, 2017 8:05 pm

I think I found a solution, Event: "On signalling error" Action: "Auto- join room"
For me this has worked, although now it's impossible to be the host, you are always a peer and I don't know what acts now as host, but it is always connected and its name is "1"
B
20
S
6
Posts: 143
Reputation: 1,666

Post » Tue Jan 10, 2017 8:06 pm

Of course, the room you rejoin has to be the same as the one you were in before
B
20
S
6
Posts: 143
Reputation: 1,666


Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot], fearfulelephants and 25 guests