Who is the host?
In this tutorial I show how peers can identify who is the host of the room, it is simple and very cool to be able to distinguish the "adm" of the room, as shown in the image...
In the image above we see that "DRI" is the person who created the room the "Host", his name is accompanied by a chess king as an icon which is a special character.
Let's go to work...
Using multiplayer chat as an example to implement the idea...
So let's go to the line where we log in to the room so for the host (yourself) the system adds the special character. and for the peer nothing unusual happens. The only change is to change the selected line.
After that go down to the condition if a peer connects...
Here we will add 2 conditions taking advantage of the previous one as in the image.
So we have the following... Repeating as many times as there are items in the list, give me what is written in each item... If any item is the same as the host's nickname then do an action...
Action: Add a special character to this nickname...
And that's it...