Author Topic: OnNetworkJoinChannel is broadcasted after a JoinRandomChannel?  (Read 3843 times)

DavidGuaita

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
OnNetworkJoinChannel is broadcasted after a JoinRandomChannel?
« 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


MCoburn

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 7
  • Posts: 69
    • View Profile
Re: OnNetworkJoinChannel is broadcasted after a JoinRandomChannel?
« Reply #1 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!  ;)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: OnNetworkJoinChannel is broadcasted after a JoinRandomChannel?
« Reply #2 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.

DavidGuaita

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: OnNetworkJoinChannel is broadcasted after a JoinRandomChannel?
« Reply #3 on: February 18, 2015, 07:36:33 AM »
 :) Thank you very much!