Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Elmo loves cookies

Pages: 1 [2] 3 4 5
16
TNet 3 Support / Re: Create localPlayerPrefab and remotePlayerPrefab
« on: October 10, 2017, 12:07:58 PM »
by this code my player from Editor don't synchronizing with othe player from build PC, but between PC builds all work is fine. it is possible to fix this? - my client from Editor can't send RFC to player(on PC build)

  1.     IEnumerator CreationPlayer()
  2.     {
  3.         while (TNManager.isJoiningChannel) yield return null;
  4.         if (channelID < 1) channelID = TNManager.lastChannelID;
  5.         Transform pos = GetStartPosition();
  6.         TNManager.Instantiate(channelID, "CreateAtPosition", "", false, pos.position + (Random.insideUnitSphere * 2), pos.rotation, TNManager.playerID);
  7.     }
  8.  
  9.     [RCC]
  10.     static GameObject CreateAtPosition(GameObject o, Vector3 pos, Quaternion rot, int id)
  11.     {
  12.         if (id == TNManager.playerID)
  13.         {
  14.             //Debug.Log("Local");
  15.             GameObject go = Instantiate(Resources.Load("Player3")) as GameObject;
  16.             Transform t = go.transform;
  17.             t.position = pos;
  18.             t.rotation = rot;
  19.             return go;
  20.         }
  21.         else
  22.         {
  23.             //Debug.Log("Remote");
  24.             GameObject go = Instantiate(Resources.Load("Player3(Remote)")) as GameObject;
  25.             Transform t = go.transform;
  26.             t.position = pos;
  27.             t.rotation = rot;
  28.             return go;
  29.         }
  30.     }

17
Misc Archive / Re: Create localPlayerPrefab and remotePlayerPrefab
« on: September 22, 2017, 12:30:33 AM »
ok, finded info - it is impossible

18
TNet 3 Support / Create localPlayerPrefab and remotePlayerPrefab
« on: September 20, 2017, 03:40:10 AM »
If I use [RCC] - I can create one example of gameObject, but I need create localPlayerPrefab and remotePlayerPrefab - it is possible?

19
TNet 3 Support / DataNode vs .txt
« on: August 22, 2017, 05:06:00 PM »
I use in my backEnd simple writing in text format(.txt), but tNet using DataNode, its have difference in performance and I should use dataNode class or I can use simple text format?

20
TNet 3 Support / for separate games on one server
« on: April 02, 2017, 08:48:38 AM »
I want to add separator on server for different games(two or more games on one server)
In what part of Tnet server - it is easy to add?
what I need: on connect players says own version of his game and he can communicate only the same version of the game of other players

21
TNet 3 Support / Re: How get GameObject on TNManager.Instantiate
« on: March 11, 2017, 08:48:01 AM »
  1. GameObject LPObject = PhotonNetwork.Instantiate("Player" + model.ToString(), spawn.position, spawn.rotation, 0); //Spawning our Player
  2.         localPlayer = LPObject.GetComponent<Player>(); //this our localPlayer

22
TNet 3 Support / Re: How get GameObject on TNManager.Instantiate
« on: March 11, 2017, 08:43:04 AM »
Maybe I cant translate to English my question, and you answer is not about this

For example,
On photon I can do that like this:

  1. GameObject LPObject = PhotonNetwork.Instantiate("Player" + model.ToString(), spawn.position, spawn.rotation, 0); //Spawning our Player
  2.         localPlayer = pers.GetComponent<Player>(); //this our localPlayer

How I can do this on TNet?

23
TNet 3 Support / Re: How get GameObject on TNManager.Instantiate
« on: March 11, 2017, 04:33:08 AM »
I need write GameObject(after create) in variable, how can I do this?

24
TNet 3 Support / Re: Sync customProperties
« on: March 09, 2017, 05:43:10 AM »
or I can do that like this?

  1. public class PlayerController : NetworkBehaviour
  2.     {
  3.  
  4.         public static PlayerController GetPlayer(int aID)
  5.         {
  6.             GameObject[] playerList = GameObject.FindGameObjectsWithTag("Player");
  7.  
  8.             for (int i = 0; i < playerList.Length; i++)
  9.             {
  10.                 if (playerList[i].GetComponent<PlayerController>().m_playerID == aID)
  11.                 {
  12.                     return playerList[i].GetComponent<PlayerController>();
  13.                 }
  14.             }
  15.             return null;
  16.         }
  17. //bla bla bla
  18. }

and use PlayerController.GetPlayer(int aID) - for take Player`s custom Values

it is not good using always "GameObject.FindGameObjectsWithTag"?

25
TNet 3 Support / Separate channelList
« on: March 08, 2017, 01:30:43 PM »
for 2 different games on one server,

TNManager.GetChannelList(***) - I should receive all channels and then separate then by: channel.level = "game1" and channel.level = "game2" ?

it ok, or I doing some wrong?
it is impossible to receive channels only from one specific game?

26
TNet 3 Support / How get GameObject on TNManager.Instantiate
« on: March 08, 2017, 01:21:31 PM »
when I create Player - I need write him in variable "private PlayerController localPlayer;"

  1. GameObject pers = TNManager.Instantiate("CreatePlayer", "Player", false, spawn.position, spawn.rotation);
  2.        
  3.         localPlayer = pers.GetComponent<PlayerController>();

but it is impossible because: void != GameObject

so, How I can put creation object in some variable?:)

27
TNet 3 Support / Sync customProperties
« on: March 08, 2017, 01:06:06 PM »
needed take some customProperties from Tnet.Player

if we can get player, by: Tnet.Player owner = TNManager.GetPlayer(int ID);
how I can get some specific value from player "owner" ?

28
TNet 3 Support / CloseChannel and need open for next match
« on: March 08, 2017, 03:56:00 AM »
When start round - I close channel.
After round I need open this channel for other players, what the best way for this?

I should use ChannelData for this?

p.s.: I need closing the channel only when game in fight round, and then I need open for expectations of new players for next fight round

29
TNet 3 Support / Re: Can I make LeaderBoard, use only tNet server?
« on: February 08, 2017, 10:48:33 AM »
can I save scoreboard on server for everyOne? - want to make global leaderBoard

30
TNet 3 Support / Can I make LeaderBoard, use only tNet server?
« on: February 08, 2017, 07:24:31 AM »
it is possible to make LeaderBoard without other service(gamesparks.net and others)?

Pages: 1 [2] 3 4 5