|
|
UED2 Tutorial - Triggers explained |
To make 'things' happen at different times and situations you need to
create events.
The game engine use a simple system of tags and events which simply mean
that all objects that have the same tag as the event will be activated.
The triggering object will broadcast its event and all objects that have the same
in their tag will react on the action.
To create these events triggers are used.
There is alot of different triggers that work in almost every situation.
You do not need triggers to create events.
Most objects will trigger an event when specific conditions have been met.
The triggers are found under "Triggers" in the actor browser.
This is a list of different triggers:
|
Trigger |
Specific |
BioFear |
Area feared by bots, determined by collision radius. |
CodeTrigger |
Will trigger event when a specific order of events been activated. |
Counter |
Triggers event when a number of events been activated. |
Dispatcher |
Triggeres multiple events with optional delays. |
DistanceViewTrigger |
A trigger that "tell" bots where to pay attention. |
ElevatorTrigger |
Elevator Mover control trigger, to summon the mover to specific frame. |
FadeViewTrigger |
Will fade the brightness of the screen. |
FatnessTrigger |
Changes size(fatness) of actor for specific time. |
FearSpot |
Area feared by pawns. |
Jumper |
A kicker but with less properties. |
Kicker |
Changes velocity and direction pawns. |
MusicEvent |
Plays/Turns-off specific song/music. |
RoundRobin |
Trigger one event from list each time it is triggered. |
SpecialEvent |
Multiple use event, sound, damage and message. |
StochasticTrigger |
Random trigger generator. |
TranslatorEvent |
Not used in UT. |
Trigger |
Default trigger. |
TeamTrigger |
Like a normal trigger but triggered by team players only. |
TimedTrigger |
Will trigger event a specific time intervals. |
ZoneTrigger |
Used to trigger zoneinfo actors. |
TriggeredDeath |
Instant death trigger. |
TriggeredTexture |
Will change the texture each time it is triggered. |
|
This is the properties of a default trigger.
(Specific trigger properties are explained under each trigger).
|
Property |
Specific |
+Collision |
|
CollisionHeight |
Height of the collision cylinder area. |
CollisionRadius |
The Radius of the collision cylinder area. |
|
|
+Events |
|
Event |
Ident name to be sent when trigger is triggered. |
Tag |
Used if the trigger should be triggered by other trigger. |
|
|
+Object |
|
InitialState |
Activation status of trigger. |
|
|
+Trigger |
|
bInitialActive |
If the trigger should be active or not. |
bTriggerOnceOnly |
Set if trigger can be triggered more than once or not. |
ClassProximityType |
Used if InitalState is "ClassProximity" to determine what class. |
DamageThreshold |
Used if InitailState is "Shoot" to determine amount of dmg needed. |
Message |
Displayed message each time trigger is triggered. |
RepeatTriggerTime |
Repeats the event for each time interval as longs as trigger is active. |
ReTriggerDelay |
Delay before the trigger can be triggered again. |
TriggerType |
This is how the trigger should be triggered. |
|
Different Trigger Types:
|
TriggerType |
Specific |
PlayerProximity |
Activated by all players, including real-life and bots. |
PawnProximity |
Activated by all creatures, players, bots. |
ClassProximity |
Activated by Class specific actors only. |
AnyProximity |
Activated by any type of actor. |
Shoot |
Activated by damage, "bDamageThreshold", from shot. |
|
The trigger can also be controlled by other triggers.
This is the different "States" a trigger can have:
|
InitialState |
Specific |
None |
Trigger will be inactive and useless. |
OtherTriggerTurnsOff |
Triggers "bInitalActive" will be false when triggered |
OtherTriggerTurnsOn |
Triggers "bInitalActive" will be true when triggered |
OtherTriggerToggles |
Triggers "bInitalActive" will change when triggered |
NormalTrigger |
Default and trigger is immune against other triggers. |
|
|
|
Adding a trigger to the level:
The first thing to think of is, what are you going to trigger, when
and how.
When you know this you must determine the best solution to create this
event.
Maybe all you need is a mover as a trigger, or a zone portal?
Nevertheless, if you use a trigger you must set the correct properties.
By adjusting the collision cylinder size you affect the "detection" area of the trigger.
I a player/pawn or bullet hit the trigger collision area the trigger
will be triggered.
When triggered, depending on setting and trigger type, it will broadcast the event
to all objects.
All objects with the corresponding tag will be affected and act accordingly.
(Moving a mover, killing players and much more).
Some properties adjust the triggers behaviour, like "bOnlyTriggerOnce",
"RepeatTriggerTime" and "ReTriggerDelay".
If "bOnlyTriggerOnce" is true the trigger will 'die' when it have been triggered and
cannot be used again.
"RepeatTriggerTime" tell the trigger to repeat itself at a interval set by this property
as long as the triggering status are true (player in proximity).
(If zero this option is not used).
"ReTriggerDelay" sets a delay before the trigger can be triggered again.
If something is in the "Message" property it will be displayed each time the trigger
is triggered.
By setting "InitalState" to "ClassProximity" and then add an actor class to the
"ClassProximityType" property you can force a certain actor/fire type to be able
to activate the trigger.
BioFear:
From what I know of this actor is that it is supposed to
make bots fear a given area (collision area of the actor).
However, I never got this to work properly.
It only have one propery and that is "bInitalActive" which
then can be triggered on/off.
From what I think, it could be used over traps and such places
where the status can be changed from deadly to harmless (traps?).
I will look into this some more and add it later.
CodeTrigger:
This is a combination trigger.
Used to force players to active a given number of "CodeTriggers" in a specific
combination to allow for the "CodeMaster" (under info) to accept.
In the end it will trigger and event, which I think must be an elevator mover
I might add more info on this trigger at later a stage.
Counter:
This trigger will only trigger an event when itself have been triggered
specific number of times.
bShowMessage - If messages should be displayed to the player or not.
CompleteMessage - Msg that will show when the counter reached a specific value.
CountMessage - Msg to show each time the trigger is triggered.
NumToCount - Num of times it needs to be triggered before it triggers the event.
This trigger can be used if you need players to perform multiple things before they
can proceed, like in AS-Mazon.
Dispatcher:
The dispatcher work as a multiple trigger actor.
It can trigger up to 8 different events with specific delays.
Under "Dispatcher" you have OutEvents[] which is the
events to be triggered in sequence.
OutDelays[] is the delay before the corresponding event
is triggered (in seconds).
The dispatcher can only be triggered by other trigger.
Very usefull when you need a series of things to happen either at once
or after each other (delay).
DistanceViewTrigger:
This actor is used to make bots pay attention to a triggering pawn.
It have no specific trigger properties and can only be triggered by a trigger.
When this actor is triggered, any pawn (bot) in its collision radius will
pay extra attention to who triggered it.
This is very useful to let bots, who are at defense points sniping, to
select strategic targets.
In the level CTF-Face this have been used.
ElevatorTrigger:
This is a trigger to better control elevator movers.
The set of properties have been moved to "ElevatorTrigger".
Two new properties can be found here and that is;
GotoKeyframe which tells the elevator mover what keyframe to
arrive at.
MoveTime is just how long the mover should use to move to that
particular keyframe.
The ElevatorTrigger will only work with a ElevatorMover.
FadeViewTrigger:
This actor will fade the brightness/color of the screen down.
There is a set of properties that handle this.
First there is "FadeSeconds" which is the amount of time
for the fade sequence (faster or slower fade).
The "TargetFlash" values should all be negative as it fades them down.
The last set of properties is "ZoneLight" that have "ViewFlash" and "ViewFog".
This is the same as with a normal ZoneInfo actor properties and give
the screen a default brightness.
FadeViewTrigger will fade the values from ViewFlash to the TargetFlash.
This means that the TargetFlash values must be lower than the ViewFlash values.
However, this do not seem to work 100% so I suspect that the the values
in ViewFlash and ViewFog should be the same as the current surrounding
(zoneinfo) values.
By fading the colors stepwise you could create a nice evening mood
fading the colors more and more.
It affect all players and must be triggered by another trigger.
FatnessTrigger:
This is supposed to change the fatness of the object with the same
tag as the FatnessTag.
I never got this to work, I will see if I do and add the info later.
FearSpot:
From what I know of this actor is that it is supposed to
make bots fear a given area (collision area of the actor).
As with BioFear I will check it out and add the info later.
Jumper / Kicker:
(Jumper is the old Unreal version of UT's kicker).
It adds instant velocity in any direction to any pawn (player/bot) who
enter its collision radius.
bKillVelocity - Sets the actors velocity to zero before adding new.
bRandomize - Adds random velocity (don't know how much differance).
KickedClasses - Specific classes that can use the kicker (default Pawn).
KickVelocity[] - The velocity added to the pawn.
MusicEvent:
This actor, which must be triggered, can be used to change the current
state of the music.
Loading a new song, cutting off the current, set a new CD song with more.
All interesting properties can be found under "MusicEvent".
The first, bAffectAllPlayers, determine if all players will be affected
by the music change.
bOnceOnly - if the music change should only happen once.
bSilence - will turn off all music selections, resulting in no music at all.
CdTrack - is what track to play from the CD, value 255 for none.
Song - is a .umx file from the UT music folder.
SongSection - can be used to start the music from another section rather
than the beginning.
Transition - is simply the flow from the current music state to the new one.
You can use this to change song in different areas to give a much more detailed
mood.
The load time before you start can be a bit longer but should not be a problem
in-game.
RoundRobin:
This actor will trigger an event each time it is triggered, in sequence from
a list.
OutEvent[] is the list of events which you want this actor to trigger, in
sequence, up to 16 events.
bLoop, either true or false will tell the actor to start the list
over again, from OutEvent 0 when the last OutEvent have been triggered.
This actor must be triggered by other trigger.
Usefull if you want different things to happen each time a player trigger
this actor.
It will only trigger one event for each time it is triggered, and then go to
the next OutEvent.
SpecialEvent:
This actor is used to show messages, play sound effects and hurt players.
Some important properties and states combined say what it should do.
bBroadCast - Show message to triggering player only (false), or all (true).
bPlayerViewRot - Don't know what do.
Damage - Amount of damage inflicted if initial state is "DamageInstigator".
DamageString - Message to show when player dies from this event.
DamageType - Type of 'harm', like "Burned", "Corroded" and so on.
Message - Message to display on screen when triggered.
Sound - Sound effect to play when triggered.
The different initial states tell how the Special Event should act.
None - Useless
PlayerPath - Single Player mode only, useless for UT.
PlayAmbientSound - Will play the sound under "AmbienSound" for the player.
PlayerPlaySound - Will play soundeffect for all players in the game.
PlaySoundEffect - Will play soundeffect from the event location only.
KillInstigator - Kill player instantly.
DamageInstigator - Hurt player specific amount of damage.
DisplayMessage - Simply shows the "Message" on screen.
If you use PlayAmbientSoundEffect, the sound effect used is under "AmbientSound"
and not "Sound" that is used for "PlayerSoundEffect" and "PlaySoundEffect".
However, you should not add a sound effect to the "AmbientSoundProperty" and have
the "PlayAmbientSound" state as it will cause the sound effect to loop twice.
First the sound effect plays from start and then another one is started
when the event is triggered.
Use "TriggeredAmbientSound" instead (see the sound tutorial for more info).
Different Damage Types:
Fell, Decapitated, Corroded, Burned, Drowned, Frozen, SpecialDamage.
StochasticTrigger:
This is a random trigger generator.
The initial state of this actor is either "AlwaysActive" or "TriggerActive"
which means that if you want the random generator to work from start, or if
you need to trigger it to start it.
The properties you have, under "StochasticTrigger" regulate chance
of trigger, what trigger and delay between random test.
Events[] - When random is success, it will trigger a random Event.
maxReCheckTime - Max delay before actor tries a random check again.
minReCheckTime - Minimum delay before actor tries a random check again.
triggerProbability - The chance of a random generator, between 0 and 1.
This can be used when you want to produce random events in the game, like lightning.
The random generator takes a value between 0 and 1, meaning that 0.5 will
be 50% chance.
If you set 1 it will be exactly like a timed trigger.
Trigger:
This is a regular trigger.
When the correct "TriggerType" conditions are met an event will be sent
and affect all objects that have the same tag as the trigger event.
TeamTrigger:
This work just like a regular trigger but have additional "TeamTrigger"
properties.
This is what team ("bTeam") that should NOT be able to trigger it.
There is also "bTimed" which I am not sure what really do.
If I figure it out I will add the info.
TimedTrigger:
The Timed Trigger is supposed wait specific time and then trigger an event.
Additional "TimedTrigger" properties allow you to adjust this.
Use "bRepeating" if you want the trigger to repeat itself or not.
"DelaySeconds" is the delay before the trigger triggers the first time and
each time if "bRepeating" is true.
This trigger is always active and cannot be triggered by player or other trigger.
ZoneTrigger:
This trigger act exactly like a regular trigger but with one differance.
When triggered it will activate a zones "bPainZone" (set true).
TriggeredDeath:
Instant death for the player who trigger this actor.
With alot of propeties which adjust the screen flashing, if items should
be destroyed, sound effects and time it is triggered to actual death.
This is useful if players travel in "deadly" areas they should not be in.
Must be triggered by other trigger.
TriggeredTexture:
You are supposed to be able to change the texture with this trigger.
Never got it to work correct. Might look into it and add the info later.
Other ways of trigger:
There is more than one way to create an event (triggering).
Actually this happens all the time, but as a player you do not
notice it.
As a rule an event will be triggered when the object/actor have served
its purpose.
Mover completes its move cycle, player grabs the flag, activates the control point,
entering a zone and so on.
This should be taken advantage of as much as possible.
The most common is probably a mover.
When a mover completes moving from keyfram 0 to the last it will trigger
an event.
This can be used to chain connect multiple movers/items.
Need to be triggered:
Lots of actors under the trigger class need to be triggered by another trigger.
This means that you need to place not only the actual actor but also something
to trigger it with.
Some of the actors that need to be triggered is,
MusicEvent, DistanceViewTrigger, Dispatcher, RoundRobin and so on.
|
|