Files
UnrealEngineUWP/Engine/Documentation/Source/Gameplay/HowTo/Networking/ReplicateVariable/ReplicateVariableOverview.INT.udn
Andrew Grant c0452957a1 Merging latest engine code from Orion via //depot/UE4-To-//UE4/Main
[CL 2744667 by Andrew Grant in Main branch]
2015-10-28 08:58:16 -04:00

29 lines
1.3 KiB
Plaintext

Availability: Public
Title:Replicating Variables
Crumbs: %ROOT%, Gameplay
Description:Guide for Replicating Variables in Multiplayer Games.
Version: 4.9
Parent:Gameplay
type:how-to
order:17
[EXCERPT:Overview]
Just as [Actors](Gameplay\HowTo\Networking\ReplicateActor) and [Functions](Gameplay\HowTo\Networking\ReplicateFunction) can be replicated over the network, so can **Variables**. Variables that are important to gameplay should only be modified on the Network Authority (Server) and then replicated to Remote Machines (Clients) on a need-to-know basis. You do not want to allow Clients to define when variables can be changed, as this could lead to cheating (setting Health, Ammo, or Experience values for example).
You can set a variable to Replicated which means the variable produces a one-to-one copy of the variable that is replicated from the Server to Clients. Or you can use the RepNotify which does everything that Replicated does, but also provides a Function that is called that executes on both the Server and Client machines whenever the variable it is attached to updates.
[/EXCERPT:Overview]
## Setup
To learn how to set up Replicated Variables using Blueprints, follow the link below:
[REGION:buttonlist]
* [](Gameplay\HowTo\Networking\ReplicateVariable\Blueprints)
[/REGION]