netwrite what does it mean?

Discuss everything related to custom data creation.

Moderator: NADEO

Post Reply
User avatar
alividerci
Posts: 363
Joined: 11 Feb 2012, 07:03

netwrite what does it mean?

Post by alividerci »

for example

Code: Select all

declare netwrite Text Net_Combo_Weapon for UI;
it is declare variable?
I'm just very often it is seen in other scripts
User avatar
TGYoshi
Posts: 795
Joined: 15 Mar 2011, 16:59

Re: netwrite what does it mean?

Post by TGYoshi »

If you declare a variable as netwrite (afaik only works with a certain players UI instance) the variable is synchronized with at client-sided scripts as well. If you make an UILayer (also works for UIAll layers) you can use:
declare netread Text Net_Combo_Weapon for UI;
at the client-sided script. In that client-sided script you can use the var Net_Combo_Weapon and it'll be the value the server set it at the netwrite var server-sided.
Like this you don't have to send the whole UI over and over again at every change.
=3
User avatar
alividerci
Posts: 363
Joined: 11 Feb 2012, 07:03

Re: netwrite what does it mean?

Post by alividerci »

TGYoshi wrote:If you declare a variable as netwrite (afaik only works with a certain players UI instance) the variable is synchronized with at client-sided scripts as well. If you make an UILayer (also works for UIAll layers) you can use:
declare netread Text Net_Combo_Weapon for UI;
at the client-sided script. In that client-sided script you can use the var Net_Combo_Weapon and it'll be the value the server set it at the netwrite var server-sided.
Like this you don't have to send the whole UI over and over again at every change.
thx
Post Reply

Return to “Title Pack & Custom Data Creation”

Who is online

Users browsing this forum: No registered users and 1 guest