Networked Variables

I’ve been having a little disagreement with my friend, am I true in saying that NWInts (and others) send usermessages to every player and so often that it’s unnecessary. Using a var system that only sends the variables to required player when the value is changed (usermessages) is a better choice, am I right in saying this?

If you are sending a NWInt to someone that doesn’t need it, it’s a waste. I don’t remember exactly how NW* works, but it’s something like that. NW* is usually seen as a bad thing, because it increases networked traffic at moments where it is not really needed, as well as set vars and ints that other players should not be able to see, but that they can due to the fact it was run through a NW* function…

Others may correct me, I have a feeling I might be wrong, and there’s a lot of people here who are a lot better than me when it comes to this.

NWvars are good for if:

  • your variable should be consistent across all players
  • your variable should be transmitted to new players
  • your variable should be transmitted on update
    ie RP names, titles, etc

Otherwise they’re less efficient and you should use usermessages
ie money, adding stuff to a player’s chat, etc