Triggers Class Reference: by BlackSway

Last Updated 2 April, 2002

BioFear | CodeTrigger | Counter | Dispatcher | DistanceViewTrigger | ElevatorTrigger | FadeViewTrigger | FatnessTrigger | FearSpot | Jumper | Kicker | MusicEvent | RoundRobin | SpecialEvent | StochasticTrigger | TranslatorEvent | Trigger | TeamTrigger | TimedTrigger | ZoneTrigger | TriggeredDeath | TriggeredTexture

 
Introduction

First a bit of jargon:

Actor: any object within the game, including brushes, triggers, weapons and players

Pawn: any moving creature, including monsters, players and bots

Player: just real-life players

ScriptedPawn: basically just monsters

Touch: means this trigger is triggered by a pawn running into its collision cylinder (formed from the collision radius and collicion height)

Event: most triggers use the Event field to trigger another event

Tag: the name of the trigger, only important if it is triggered by another trigger

Each trigger has a number of keys next to it to signify a number of things:

UT: available in Unreal Tournament only (does no mean all triggers are useful in UT)

          TC: triggered by pawn contact

          TG: triggered by another trigger

The most basic trigger is Trigger. Check this one out first.

 
BioFear: UT, TC
Bots will fear randomly fear this spot dependant on their skill level. The CollisionRadius is reduced each time it is triggered by 25 until it is under 120 and then destroyed.
Parameters

bInitiallyActive:

whether the BioFear is initially active or not.

[^Top]
 
CodeTrigger: TC

See CodeMaster for a full run down of what the CodeTrigger does.

Parameters

Event:

tag for the ElevatorMover to trigger

Code:

tag of this CodeTrigger

CodeMasterTag:

tag of the code master

[^Top]
 
CodeMaster

The CodeMaster and CodeTrigger are used when you wish a number of things to be triggered in sequence. For example 3 triggers, say 1, 2 and 3 that open a door. However only if you press them in the following order does it work, 2, 1, 3.

The ElevatorMover is the 'visual cue' that a CodeTrigger has been triggered.

There is however a 'race' condition which means that things do not reset quite how they should.

Each CodeTrigger should have the CodeMasterTag set to the tag of the CodeMaster, Event set to the tag of the elevator mover and Code set to the sequence number (from 0 up).

The CodeMaster should have MainEvent set to the event to trigger on success, the OrderCode array set to the correct order of the CodeTriggers (e.g. 1, 0, 2), the MoverTags array set the the movers tags corresponding to each CodeTrigger and the NumElements set to the number of CodeTriggers you have.

Parameters

OrderCode[6]:

array listing the correct order of up to 6 CodeTrigger tags

MoverTags[6]:

array listing up to 6 ElevatorMover tags to reset if the order fails

NumElements:

the number of CodeTriggers

MainEvent:

tag of the event to be fired when the order is correct

Example map

Working on it (anyone!)

Note
The race condition I mentioned earlier means that the last mover to be trigger during a incorrectly entered sequence will not move when the CodeTrigger for that mover is touched again. This however does not effect the success or otherwise of your triggering.
[^Top]
 
Counter: TG
A countdown trigger with optional text message displayed to the event instigator.
Parameters

NumToCount:

number to count down from (A normal trigger would be 1)

bShowMessage:

whether to display a message to the players

CountMessage:

the message to be displayed with each count. The string %i is replaced with a number string (‘one’, ‘two’ etc).

CompleteMessage:

the message to be displayed when the actor is triggered

[^Top]
 
Dispatcher: TG
A trigger which can trigger up to 8 other events with optional delays for each event. Must be triggered itself by another trigger.
Parameters

OutEvents[8]:

the optional 8 events to be triggered

OutDelays[8]:

the optional 8 delays for each event

[^Top]
 
DistanceViewTrigger: UT, TG

When triggered it triggers all pawns that are within its collision radius and collision height. It has no parameters apart from the Event->Tag for its name.

It is used in UT as an anti-snipper/snipper assist trigger. Put a trigger where the snipper will be and set it to trigger a DistanceViewTrigger where bots will be. Then when a sniper appears any bots within the collision radius of the DistanceViewTrigger will get a ‘nudge’ and are more likely to notice the sniper (See CTF-Face for examples). This can also be used in reverse to make bot snipers more likely to see enemy on the ground by putting putting the trigger on the ground and the DistanceViewTrigger at the snipe spot (see CTF-Face and AS-Overlord for examples).

 

So for example: If you have a sniper spot, and the sniper keeps sitting there and no-one ever notices them from the ground, put a trigger at the sniper point, put a distance view trigger on the ground (make its collision radius quite big if you like) and then when the sniper appears at the snipe point the bots will notice them and attack if they are not doing something else.

Example map

TUT-Trig-DistView.zip

[^Top]
 
ElevatorTrigger: TC
When triggered by the usual array of Player/Pawn/Class/Any/Shoot (See normal trigger for fuller explanation) it moves an ElevatorMover to a specified keyframe.
Parameters

bTriggerOnceOnly:

true if the trigger can only be triggered once

ClassProximityType:

used with the TriggerType of TT_CLASSPROXIMITY so it can only be triggered by this specific class

GotoKeyFrame:

the keyframe to move the ElevatorMover to

MoveTime:

the amount of time the ElevatorMover takes to move

TriggerType:

TT_PlayerProximity / TT_PawnProximity / TT_AnyProximity / TT_ClassProximity / TT_Shoot

[^Top]
 
FadeViewTrigger: UT, TG

This produces a ‘Flash’ which gradually fades. The size of the flash will move from FadeViewTrigger->ZoneInfo->ViewFlash till it is smaller than FadeViewTrigger->TargetFlash in FadeViewTrigger->FadeSeconds seconds.

The only place I could find this trigger is in the end sequence for AS-OceanFloor where the view fades to black. This uses all the default values with a FadeSeconds value of 3.

Parameters

bTriggerOnceOnly:

whether it can be triggered only once

FadeSeconds:

number of seconds for the fade to be over

TargetFlash():

the target flash vector

[^Top]
 
FatnessTrigger: TG
Changes the fatness of a tagged actor from one state to another in a specified time.
Parameters

FatTag:

tag of the actors to be changed

StartFatness:

initial fatness of the actor (normal fatness is 128)

EndFatness:

end fatness

ChangeTime:

time taken to move between StartFatness and EndFatness

[^Top]
 
FearSpot: TC, TG
This is a spot that all pawns will fear.
Parameters

bInitiallyActive:

whether the spot is initially feared.

[^Top]
 
Jumper: TC
This will only affect ScriptPawns (i.e. monsters). It basically sets the monsters Z velocity to Jumper->JumpZ. The Movement->Rotation also affect the monsters rotational velocity and set its DesiredRotation.
Parameters

bOnceOnly:

only triggered once

LimitedToClass:

limits it to a specific class of monster

JumpZ:

amount of Z velocity. If 0 then it defaults to 100 (ish..)

[^Top]
 
Kicker: UT, TC
Similar to the Jumper but affects all pawns. Also sets all direction velocities, and not just Z.
Parameters

KickVelocity():

X,Y,Z for the velocity to add to pawn

KickedClasses:

classes which are effected by the Kicker (blank for all)

bKillVelocity:

if true then sets pawn velocity to zero before adding KickVelocity. Otherwise only Z velocity is reset and X and Y are added to the KickVelocity

bRandomise:

randomises the KickVelocity

[^Top]
 
MusicEvent: TG
Pays the specified music to one or all players.
Parameters

Song:

music from the browser. If blank defaults to the song for the level

SongSection:

section of the music

CDTrack:

CD track to play

EmusicTransition:

transition (to/from?)

bSilence:

if true then SongSection and CDTrack are both set to 255 (?)

bOnceOnly:

triggered only once.

bAffectAllPlayers:

if true then music played to all players, if not then only triggering player.

[^Top]
 
RoundRobin: TG
Each time this is triggered it triggers then next event in a list. It can also loop back to the beginning
Parameters

OutEvents[16]:

events to be triggered

bLoop:

if true then it loops back to the first event after triggering the last

[^Top]
 
SpecialEvent: TG

This event does a large number of very interesting things.

Firstly it can display a message to the triggering play or if bBroadcast is true then to all players.

The rest of the actions depend on the InitialState:

  • DisplayMessage: only display the message
  • DamageInstigator: Display DamageString to players and damage any pawn by the Damage amount.
  • KillInstigator: Kill the pawn, registering it as a death of type DamageType. Display message DamageString
  • PlaySoundEffect: plays the sound in the Sound parameter
  • PlayersPlaySoundEffect: plays the sound effect only the players (don’t know how this is different from above, presumably monsters wont react to this sound)
  • PlayAmbientSoundEffect: sets the triggers ambient sound to the AmbientSound parameter
  • PlayerPath: Works only when Level.NetMode = NM_Standalone (i.e. Single Player only). Moves the player along the InterpolationPoints with tag of Event->Event
  • Parameter bPlayerViewRot seems to be ignored.
[^Top]
 
StochasticTrigger: TG
A random trigger generator. It has two InitialStates, AlwaysActive and TriggeredActive. The latter means it must be triggered before it will genereate any events. It randomly triggers one of up to six events.
Parameters

Events[6]:

up to six events which will be chosen to trigger.

triggerProbability:

each time it tests itself this is the probability that an event will be triggered. (Between 0 and 1)

minReCheckTime:

minimum time between tests

maxReCheckTime:

maximum time between tests

Example map

TUT-Trig-Sto.zip

[^Top]
 
TranslatorEvent: TC, TG
This is used in single player Unreal maps. If you have the translator then a message appear in it for you. If bTriggerAltMessage if true then the translocator is reset with the AltMessage.
Parameters

AltMessage:

alternative message to be swapped in

bTriggerAltMessage:

if true, after the trigger is triggered then TranslatorEvent is reset the AltMessage is displayed

bTriggerOnly:

no know effect

Hint:

no know effect

M_NewMessage:

message displayed when the new message arrives

M_TransMessage:

message displayed when the message arrives and is not new

ReTriggerDelay:

delay until trigger can be triggered again, should be just greater than zero so is not triggered twice with one walk through.

[^Top]
 
Trigger: TC, TG
The mother of them all, the default type of trigger.
Parameter

bInitiallyActive:

whether the trigger is initially active or not (i.e. whether another trigger needs to trigger this trigger before it can trigger anything else...)

bTriggerOnceOnly:

whether the trigger can only be triggered once.

ClassProximityType:

only the given class can trigger then event (if TriggerType is TT_ClassProximity)

DamageThreshold:

how much damage has to be inflicted before the it triggers the event (if TriggerType is TT_Shoot)

Message:

message to display when triggered

RepeatTriggerTime:

if the pawn who triggered the trigger stays ‘touching’ the trigger then then after this time repeat the event.

ReTriggerDelay:

amount of time before event can be triggered again.

TriggerType:

TT_PlayerProximity / TT_PawnProximity / TT_ClassProximity / TT_AnyProximity / TT_Shoot

Example map

TUT-Trig-Trigger.zip

[^Top]
 
Teamtrigger: UT, TC, TG
As above but only triggered by for teams not matching Team. Also has bTimed parameter which seesm to turn it into a timed looping trigger. (****)
[^Top]
 
TimedTrigger: UT, TC, TG

Triggered after DelaySeconds, doesn’t work in Deathmatch games which require you to press a button to signal you are ready (Tournament type)

If bRepeating is true then it also repeats every DelaySeconds.

Parameters

DelaySeconds:

delay in seconds before triggered

bRepeating:

if true then triggered again in above number of seconds

[^Top]
 
ZoneTrigger: TC, TG
This triggers all zoneinfo actors with a matching ZoneTag. Good for turning on PainZones
[^Top]
 
TriggeredDeath: TC
This kills any player who touches it with a screen flash and sounds
Parameters

MaleDeathSound:

sound to play if player is male

FemaleDeathSound:

sound to play if player is female

StartFlashScale:     

[^Top]
 
TriggeredTexture
This replaces the DestinationTexture with the first value in the Textures[] array and then each time it is triggered it moves to the next texture in the Textures[] array.
Parameters

bTriggerOnceOnly:

if true it can be triggered through all the textures to the end and then stops. If false it will loop back to the beginning.

DestinationTexture:

texture to be replaced

Textures[10]:

array of ten textures to rotate through. The first texture[0] will be the one seen at the start of the game.

Example map

TUT-Trig-Texture.zip

[^Top]