RepNotify: Difference between revisions

From Unreal Wiki, The Unreal Engine Documentation Site
Payback (talk | contribs)
Created page with '==RepNotify== The keyword '''RepNotify''' is used to trigger the Replicated Event at the point it is replicated. Syntax: var repnotify PlayerReplicationInfo PlayerReplicati…'
 
Payback (talk | contribs)
No edit summary
Line 6: Line 6:
var repnotify PlayerReplicationInfo    PlayerReplicationInfo;
var repnotify PlayerReplicationInfo    PlayerReplicationInfo;


You can then trigger code when the variable has been replicated.
You can then trigger code when the variable has been replicated with the following function


simulated event ReplicatedEvent(name VarName)
simulated event ReplicatedEvent(name VarName)
{
if (VarName == 'PlayerReplicationInfo')
{
if (PlayerReplicationInfo != None)
{
PlayerReplicationInfo.ClientInitialize(self);
}
}
else
{
Super.ReplicatedEvent(VarName);
}
}

Revision as of 01:03, 26 June 2010

RepNotify

The keyword RepNotify is used to trigger the Replicated Event at the point it is replicated.


Syntax: var repnotify PlayerReplicationInfo PlayerReplicationInfo;

You can then trigger code when the variable has been replicated with the following function

simulated event ReplicatedEvent(name VarName)