Tasharen Entertainment Forum

Support => TNet 3 Support => Topic started by: DavidGuaita on February 17, 2015, 09:28:24 AM

Title: OnNetworkJoinChannel is broadcasted after a JoinRandomChannel?
Post 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

Title: Re: OnNetworkJoinChannel is broadcasted after a JoinRandomChannel?
Post by: MCoburn on February 17, 2015, 08:05:11 PM
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!  ;)
Title: Re: OnNetworkJoinChannel is broadcasted after a JoinRandomChannel?
Post by: ArenMook on February 17, 2015, 10:51:52 PM
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.
Title: Re: OnNetworkJoinChannel is broadcasted after a JoinRandomChannel?
Post by: DavidGuaita on February 18, 2015, 07:36:33 AM
 :) Thank you very much!