1
TNet 3 Support / Re: What are the TNet equivilent of these UNet functions?
« on: September 14, 2017, 08:06:42 PM »
Thanks - I'll give it a shot.
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.
TNObjects are scripts, they shouldn't be static. However an object you have it on can have a static reference you can access. For example in Windward I have a "GameConfig" class that has a "static GameConfig instance;" -- when I need to send something to the config's TNObject, I just do GameConfig.instance.tno.Send(...);
There is no particular reason for it... just how I chose to do it early on. It's basically a "list of other players", since you always know that you are present.Alright, so I can use it to store loadout data and other stuff related to the player. Great as this saves me having to compress the load out data into a string and then parse it.
playerDataNode is a DataNode, which is much more than a dictionary. It's a tree-like structure. Think of it as an XML tree. Each node can have children. Each of those children can have children of their own, etc.
player.playerDataNode should only be read-only. Only the player who owns it should be able to change its contents. Otherwise you get into hairy situations where one client changes something, then another client does a similar operation at the same time, and then one overwrites the other. Like a thread race condition, only online.
Player limits are handled by the server. All players in the channel count toward this value, host included. So if your limit is 16 and a host joins, you have 15 slots remaining. When checking a list of players on the client side, the list excludes you.Right. Is there any particular reason why the list excludes the player? (I'll just have to add them into the scoreboard at the bottom of the window).
Lobby server will show 1.Okay, to counter this I could just take the number and subtract one, so servers are "empty" when it's just the server in there so to speak.
I suggest handling custom versioning yourself if you need it. For example in Windward I check what mods the player has active and match it against the mods that the previous player set. If an updated version is detected, the list of mods gets updated (Each mod has its own version number). If the previous player sent that mod-setting RFC with a newer version of the mod, the player gets disconnected with an error message.Ah, ok. Understandable.
As i stated my character dosent currently have a rigidbody but a character controller, Does this mean you have to have a rigidbody for this to work? If not how would it be done without one?If you're using a character controller with a rigidbody sync script, then it will fail, because it cannot reference the rigidbody to sync over the network.