I don't need to test my programs. I have an error-correcting modem.


From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2004 :: Actor >> NetworkTrigger (Package: UnrealGame)

(This actor is new in UT2004)

When a NetworkTrigger's Events->Tag is triggered or reset on the server, it will cause an Events->Event to be triggered/reset on all clients.

NetworkTriggers will keep track of the number of times they have been triggered and reset, and will automatically cause a new client to replay the same sequence when joining a game, to bring it up to the same point as everybody else.

This actor is mainly useful when something which generates events on the server (such as a ScriptedTrigger) needs to trigger actors which only exist on the clients (such as Emitters, and other effects).

It should be noted that if you are considering using a NetworkTrigger to trigger an Emitter, you might want to look at the NetworkEmitter actor, which combines both of these functions in one convenient package.


Important Properties Inherited from Actor[edit]

When a trigger matching this tag occurs, this actor will trigger an event on all clients.
The name of the event which is triggered on clients.

(Hidden Properties)[edit]

byte TriggerCount [replicated to clients]
Keeps track of how many times this actor has been triggered.
byte OldTriggerCount
Used to determine whether TriggerCount has changed (and thus should generate client event(s)).
byte ResetCount [replicated to clients]
Keeps track of how many times this actor has been reset.
byte OldResetCount
Used to determine whether ResetCount has changed (and thus should generate client reset(s)).
bool bNotFirstCall
Used internally to prevent spurious client resets at the beginning of the game.



PostNetReceive ( ) [simulated] 
Calls UpdateTriggerCount. Also calls DoClientReset if a resent event has occurred.
Trigger (Actor Other, Pawn EventInstigator) [simulated] 
On the server, updates TriggerCount and initiates a replication event. If called on a client, immediately triggers an Events->Event.

Other Functions[edit]

PostNetBeginPlay ( ) [simulated] 
Calls DoClientReset and UpdateTriggerCount to set up initial property values.
UpdateTriggerCount ( ) [simulated] 
Keeps track of triggering history, and fires Events->Event triggers as many times as necessary to keep up with TriggerCount.
DoClientReset ( ) [simulated] 
Calls Reset() on all actors with tags matching Events->Event.
Reset ( ) [simulated] 
On the server, updates ResetCount and initiates a replication event.

Known Subclasses[edit]