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 - lynohd

Pages: [1] 2
1
TNet 3 Support / Re: Admin folder & server file problem
« on: October 09, 2017, 01:48:05 PM »
right
how can i make it so it generates the folder in the applications directory instead of in documents?

2
TNet 3 Support / Re: Admin folder & server file problem
« on: October 07, 2017, 11:44:18 AM »
how do i know if its got permissions for that?

also in the TNServer source code theres nothing for the "localPath" parameter?

3
TNet 3 Support / Admin folder & server file problem
« on: October 07, 2017, 12:16:54 AM »
Hi, for some reason the admin.txt file does not get created automaticly and i have to go into X directory to make it manually.

it was only after i added the "-app" parameter in my TNServer that it generated a folder in my documents (which i think is not a appropiate place for it to be generated, and idk how to change it).

i also tried the "-localpath" parameter but that did nothing.

also the "server.dat" file that the  TNServer generates when ran is completely empty aswell?

4
TNet 3 Support / Re: onJoinChannel fired more than once?
« on: May 27, 2017, 06:49:09 PM »
Yes I do.

5
TNet 3 Support / onJoinChannel fired more than once?
« on: May 26, 2017, 09:41:17 PM »
Hi,
for some reason when i use onJoinChannel it gets fired more than once
  1.  void OnNetworkJoinChannel (int channelID,bool succes,string message)
  2.     {
  3.         if (succes)
  4.         {
  5.             Debug.Log("Connected to Lobby: " + channelID);
  6.         }
  7.     }
  8.     private void OnEnable ()
  9.     {
  10.         TNManager.onConnect += OnNetworkConnect;
  11.         TNManager.onJoinChannel += OnNetworkJoinChannel;
  12.     }



6
TNet 3 Support / Re: Connect to a server
« on: February 14, 2017, 06:21:21 AM »
I opened my ports and used the Server that came with your package, and i have tried to connect with external ip, but my friends said they didnt find my server or anything
so im not sure, I dont even know. im all overwhelmed with TNet right now, not even sure what im trying to do anymore haha

7
TNet 3 Support / Connect to a server
« on: February 10, 2017, 10:59:01 AM »
Hello, I was going to play-test a game ive been working on for a few days but ran into some issues.
other people werent able to connect to a lobby / gameserver, I probadly have setup everythijng wrong (I followed and did the exact same as in the Demo files)
what is the correct way to set up a server and let everyone connect to it?

sorry for bad english, couldnt word myself writing this post.


Appreciate all help

8
Shouldnt just enabling/Disabling components accordingly do the trick?

  1. if(tno.IsMine)
  2. {
  3. CameraComponent.enabled = true;
  4. }else {
  5. CameraComponent.enabled = false;
  6. }

9
TNet 3 Support / Re: List<> problem
« on: August 20, 2016, 02:19:39 PM »
Thanks, But now it wont show up in the inspector anymore..  :-\

10
TNet 3 Support / List<> problem
« on: August 20, 2016, 12:43:54 PM »
Hi, for some reason when i wanna use a list it gives me an error message saying:
Error   CS0104   'List<>' is an ambiguous reference between 'TNet.List<T>' and 'System.Collections.Generic.List<T>'   

is there any ways to use a list with TNET imported without having to put TNet.List infront of everything?

thanks in advance

11
TNet 3 Support / Re: Sync player states and animations
« on: May 27, 2016, 02:55:52 AM »
Ahh I see! looks like I've got new stuff to learn then!
thanks alot for your help! i appreciate it alot!

also one more question if I may,
what is the ? :o
  1. NetworkManager.NETID_SYNC_INPUT

12
TNet 3 Support / Re: Sync player states and animations
« on: May 27, 2016, 01:14:57 AM »
I legit have  no idea wtf i just read...  :o
Im kinda "new" to programming and I havent gotten that far into the advanced stuff. i have no idea what "<<=" means, could u please explain? :)
Thanks

13
TNet 3 Support / Re: Sync player states and animations
« on: May 26, 2016, 05:15:34 PM »
Okay thanks alot, I dont have a rigidbody controller so checking for movements and velocity isnt that easy so this is what i went ahead and did instead.
I dont know if this is good or reliable but for NOW its working atleast.. You see for yourself and tell me what i could improve :-)



  1. public class LocalPlayerController : PlayerController {
  2.     [System.NonSerialized]
  3.     public TNObject tno;
  4.  
  5.     public override void Start()
  6.     {
  7.        
  8.         tno = GetComponent<TNObject>();
  9.         if (tno.isMine)
  10.         {
  11. //to prevent players from being stuck in the air when theres no movement / inputs being sent
  12.             InvokeRepeating("SyncMyPos", 1.5f, 1.5f);
  13.             base.Start();
  14.         }else this.enabled = false;
  15.     }
  16.  
  17.     public void SyncMyPos()
  18.     {
  19.         if(tno.isMine)
  20.         tno.SendQuickly(1, Target.Others, transform.position, transform.rotation, state);
  21.     }
  22.     public override void Update()
  23.     {
  24.         if (tno.isMine)
  25.         {
  26.             base.Update();
  27.             if (base.moveDirection.x != 0 || base.moveDirection.z != 0 || base.moveDirection.y >= 0 || base.velMagnitude >= 3f)
  28.             {
  29.                 tno.SendQuickly(1, Target.Others, transform.position, transform.rotation, base.state);
  30.             }
  31.         }
  32.     }
  33.     [RFC(1)]
  34.     public void UpdatePlayer(Vector3 pos, Quaternion rot, int playerState)
  35.     {
  36.         if (tno.isMine) return;
  37.         Vector3 newpos = Vector3.Lerp(transform.position, pos, 5f);
  38.         Quaternion newrot = Quaternion.Slerp(transform.rotation, rot, 5f);
  39.         int NewPlayerState = playerState;
  40.         transform.position = newpos;
  41.         transform.rotation = newrot;
  42.     }
  43. }
  44.  


14
TNet 3 Support / Sync player states and animations
« on: May 25, 2016, 02:34:27 PM »
Hello, back at it again with another problem ::)

I want to tell other players whether im running or walking or standing still and make other players see the appropiate animation for this,
but I dont fully understand how I would go about doing it. I have tried like 5 different methods

Destroying the Animation GO on the local client and still having it on other players client and assigning the players speed too the animator but that doesnt seem to work,
Im really confsed and just dont understand how I would og about doing this


does scripts and gameobjects that doesnt belong too other players be disabled or destroyed?
or simply just put a if(!tno.isMine) return; on them so that the code wont run on them?


15
TNet 3 Support / Re: Seperate Players?
« on: May 25, 2016, 12:38:57 PM »
Thank you very much for clearing that up.starting to get the hang of this now :)
My VPS is hosted in the netherlands and im from europe so i shouldnt really get that high ping, but i contacted customer support and told them about it.

Thanks alot for all of your guyses help, I appreciate it alot.

Pages: [1] 2