Author Topic: Tnet 3.0 create/take channels  (Read 2861 times)

Elmo loves cookies

  • Jr. Member
  • **
  • Thank You
  • -Given: 60
  • -Receive: 1
  • Posts: 62
    • View Profile
Tnet 3.0 create/take channels
« on: May 09, 2016, 09:59:47 AM »
Please help me to create channel with DataChannel, how it create and receive?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tnet 3.0 create/take channels
« Reply #1 on: May 10, 2016, 05:56:19 AM »
What's DataChannel? I don't understand your question...

Elmo loves cookies

  • Jr. Member
  • **
  • Thank You
  • -Given: 60
  • -Receive: 1
  • Posts: 62
    • View Profile
Re: Tnet 3.0 create/take channels
« Reply #2 on: May 10, 2016, 09:53:12 AM »
I mean: DataChannel - info about channel - NameRoom, current number of players

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tnet 3.0 create/take channels
« Reply #3 on: May 10, 2016, 06:19:44 PM »
There is no DataChannel.

There's Channel Data, I assume that's what you mean. It's covered by the tutorial: https://docs.google.com/document/d/1AtEHMNS8Ltqjjn3vZSw7t7AW8UJexhqVZpk0VV90k-c/edit

All tutorials come with TNet, and are also linked in the sticky post here: http://www.tasharen.com/forum/index.php?topic=13953.0

Elmo loves cookies

  • Jr. Member
  • **
  • Thank You
  • -Given: 60
  • -Receive: 1
  • Posts: 62
    • View Profile
Re: Tnet 3.0 create/take channels
« Reply #4 on: May 13, 2016, 09:49:18 AM »
by this tutorial: https://docs.google.com/document/d/1AtEHMNS8Ltqjjn3vZSw7t7AW8UJexhqVZpk0VV90k-c/edit#heading=h.i87ek3heixxp
after connect and disconnect from channel the variable [info.data.GetChild<string>("name")] is equal to zero, just need to send [TNManager.SetChannelData]
How I can receive info from [info.data.GetChild<string>("name")] after disconnect from some channel or I need save this information before connect to some channel?

(sorry for my bad English=(, hope you understand me)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tnet 3.0 create/take channels
« Reply #5 on: May 14, 2016, 06:43:58 PM »
The channel won't persist the data unless you created the channel with the "persistent" flag passed as "true".

TNManager.JoinChannel(id, <persistent>)