Tasharen Entertainment Forum
Support => TNet 3 Support => Topic started by: DavidGuaita on February 17, 2015, 09:28:24 AM
-
Hi, I have some questions about the channels.
1) OnNetworkJoinChannel is broadcasted after a JoinRandomChannel?
If not, there is any way to broadcast a message for JoinRandomChannel?
2) After joining a channel with a level name doing like this:
TNManager.JoinChannel(1,"Menu");
If we try later to join again the same channel without the level name, that level would automatically reloaded? Using this code for instance:
TNManager.JoinChannel (1,"");
Thanks
-
1) OnNetworkJoinChannel is announced anytime when a client joins a channel, including yourself (ie. the server instance joins a channel).
2) Not sure. Try it and see! ;)
-
OnNetworkJoinChannel(success, errMsg) is triggered when you join the channel. OnNetworkPlayerJoined(Player) is called when another player joins. So yes, you will receive it some time after starting the join operation with the "success" flag indicating whether you actually joined or not.
No, joining the same channel with a different level name will not work. To switch levels, use TNManager.LoadLevel. All future players to join will automatically go to this new level instead of the one you used to JoinChannel with.
-
:) Thank you very much!