###
TRIGGER TUTORIAL

"Machismo"
cool_machismo@yahoo.com

### INTRODUCTION

Hmmmmm........ what's this tutorial doing here :). This tutorial will show you what a trigger is and how to make use of it in all kinds of situations - I will be covering everything that should help both BEGINNERS. I will try to make this tutorial as comprehensive as possible. At the beginning ....................... then :0).

### BASIC TRIGGERS

A trigger is an actor that allows you to setoff other events when it is activated. For example say you could have a trigger that when touched causes an earth quake. The most common uses of a trigger is to have it open a door or kill the player who touches it. Lets take a simple example and see how to make music play in a silent level or make a music transition.

First make a room it doesn't matter what size and the place a trigger in the center of the room. You'll find it under actor > triggers > trigger : -
NOTE :- Do not expand trigger just select it the others will be of use later.

Ok now under triggers you will find another actor called music event place this in the level (it looks like an eagle head). It does not matter where exactly you place a music event in the level - but the trigger matters a lot. The following information is very important so burn it in your mind.

To make the trigger activate the music event you need to properly tag them up by using both the items found under their respective properties in EVENTS. First open the triggers properties and set EVENTS>EVENT to "musicchange" without the quotes. Now go to the properties of the music event and set the EVENTS>TAG to "musicchange". THE EVENT OF THE ACTIVATOR MUST MATCH THE TAG OF THE THING BEING ACTIVATED.

This is how you must always set up the events and tag for anything you want activated. Like these two dialogs :-
Besides this you must immediately go to the top or any of the side views and verify that the event and tag (in this case the trigger and the music event) are linked by a red line. See below:-

Now place a player start in a corner of the room and we'll see how to set the area that the trigger affects. This works through radius system. To see the radius of the trigger, right click on anywhere on the top part of any of the view 9near the joystick button) and in the menu that appears choose view> actors > radii view. Now set this in all four views and when you see the trigger in the 3d view you'll see a red cylinder denoting the area that the trigger affects. You'll see that it is too small. Now go to the triggers properties, and under collision you'll find the collision radius and collision height. Play around with this until you get the radius and height that you need. My room is 512x768x768 so I used the following:-

The basic part is not over yet and we have a long way to go {:(. Time to configure the music event. Just go to it properties and under music event (duh........... moose woulda been proud of me ;), set this :-
Make sure that you first load up your fav music track from the music browser before selecting it and hitting the use button in the song subsection in MusicEvent.

Fire your level and when you walk into the center of the room you will find that the music changes from silence or what ever was playing before to the new song. Earth to Mars : Basic Triggering triggered Sir. :).

### TRIGGER PROPERTIES

Ok previously we only changed the collision height and radius of the trigger. Usually (most of the time actually) you need not change anything else. Most of the items are self explanatory but sometimes when looking for a cool effect to do you keep wondering where to find it till some one either points it out or you spend hours trying to locate it. Ok here's the other properties that you can change for a trigger (assuming you have properly set up the event and tag as described above) :-

- bInitiallyActive - Whether the player on touching this trigger itself can activate the event or whether it must be activated by another event or another trigger.

- bTriggerOnceOnly - Great for one time puzzles and events that you want to happen only once. Say like a secret door that you want to be triggered to open only once and then stay in that state till the end of the game.

- ClassProxmityType - Can only be activated by this type of pawn. This particular bot is found under pawn > bot > humanbotplus > tmalebotplus > tbossbot.

- DamageThreshold - The amount of damage the trigger can take before it is put in a triggered state. See also Trigger Type.

- Message - The message to display in the Heads-Up-Display (HUD). Note to display the message across the screen you need to set off a special event. The Special Event tutorial can be read here.

- TriggerType -

  - TT_PlayerProxmity - Normal Trigger.

  - TT_Shoot - You need to shoot (duH ................ its me Einstein :() it to activate the trigger.

  - TT_PawnProxmity - Can be activated by any pawn found under the pawn menu but not the player.

  - TT_ClassProxmity - Can only be activated by the specific type of class specified in the ClassProxmityType field. This was used by the unreal1 developers to make those friendly Nali sequences. That's where you can never seem to be able to open a door but when the Nali steps in the radius of the trigger the door or whatever is activated. And don't forget to set the Class proximity type to Class'UnrealShare.Nali' or whatever.

- ReTriggerdelay - After how much time the trigger can be activated again.