I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

Difference between revisions of "RepNotify"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(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…')
 
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 02: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)