TRForge Advent calendar

Trigger Tutorial Part2

by uranos1 / Translations by Codo, TifaNazah

Tutorial: To Trigger for advanced learners

Previously in Part1 we had learned several things about the different triggertypes, the codebits and the Trigger Triggerer and what you can do with it.
And now the conclusion…

Inhalt:

Tigger

Do not mistake Trigger for Tigger. That is this guy and he is spelled without the first R. ;-)

4. Rollingballtrick

Rolling boulder

The rolling boulder (“Rollingball” im TRLE) is a typical trap.

Most likely, anyone who has ever had a go at using the Level Editor already knows it: The Rollingball trick. However, we’d like to provide an explanation anyway - for the sake of completeness. The Rollingball’s original purpose was its use as a trap in the shape of a boulder or something similar which would smush Lara if she got in its way. What made the boulder’s use for this trick so popular, however, was its ability to trigger all “Heavy”- Triggers and “Heavyantitriggers” in its path.

In essence, the whole trick consists in indirectly triggering something by using the Rollingball - triggering the Rollingball first so that it rolls down a slope and triggers other triggers. When using this technique, the first trigger can be placed directly under the Rollingball; it will be triggered as soon as the Rollingball itself is released. As long as the Rollingball is inactive, it will not affect the trigger. However, it is also possible to place triggers at the end of a slope to ensure that they are triggered with a time delay.

Another variant consists in using two slopes that face each other on which the Rollingball will endlessly roll back and forth as long as there is no level square between them.


rollingball-room

A typical rollingball room with multiple rollingballs.

Thus, it’s possible to realise things that would be impossible without the Rollingball. Nevertheless, there are a number of drawbacks to this trick. For one thing, it obviously requires an additional object - but you’ll face the same problem with TT as well.

Secondly, using this trick may result in problems in the level, especially regarding the cameras, if a Rollingball remains on a trigger. You may be able to avoid this if you let the Rollingball roll a little further, but this is not always possible.

One should also take into consideration that events triggered using this indirect method cannot be repeated or reversed easily. Anti-triggering the Rollingball will not deactivate what it has activated. It is also not possible for the Rollingball to trigger a trigger which it has already passed once more.Thus, this trick is inapplicable if you want to be able to freely repeat an event.

Because the Rollingball being visible to the player is undesirable, the best solution is to put it in a separate room placed next to your normal rooms. Since you may well need more than one boulder, you should equip the room with plenty of space.


Uses:

Triggering effects using multiple triggers:
Normal objects can be triggered using multiple triggers by simply activating different codebits for the triggers. This is not possible with a range of effects, though, such as the playback of new background music or the activation of cameras. Many such effects are triggered even if only one of the trigger’s codebits is activated. Using the Rollingball, however, these effects can also be triggered using multiple triggers. This is done by placing the Rollingball on a “Heavy”-Trigger and triggering the Rollingball with multiple triggers.
Activating and deactivating something simultaneously:
There is already a method of doing this using codebits and one should, therefore, try making use of this first. Should this fail to work for certain reasons, however, one can make trying to achieve one’s goal by using the Rollingball trick the next step. When doing so, one would only trigger the things one wants to activate plus the Rollingball via the direct trigger. Under the Rollingball, one would then place Heavy Anti-Triggers for everything one wants to deactivate.
  • Fire A
    Object: FLAME_EMITTER2
    Codebits: none activated
    Trigger: 1, Trigger B
  • Fire B
    Object: FLAME_EMITTER2
    Codebits: none activated
    Trigger: 1, Trigger B
  • Fire C
    Object: FLAME_EMITTER2
    Codebits: none activated
    Trigger: 1, Trigger C
  • Fire D
    Object: FLAME_EMITTER2
    Codebits: none activated
    Trigger: 1, Trigger C
  • Fire E
    Object: FLAME_EMITTER2
    Codebits: none activated
    Trigger: 1, Trigger D
  • Fire F
    Object: FLAME_EMITTER2
    Codebits: none activated
    Trigger: 1, Trigger D
  • Fire G
    Object: FLAME_EMITTER2
    Codebits: none activated
    Trigger: 1, Trigger E
  • Fire H
    Object: FLAME_EMITTER2
    Codebits: none activated
    Trigger: 1, Trigger E
  • Trigger A
    Triggertype: Trigger
    Codebits: all
    Targets: Rollingball
  • Trigger B
    Triggertype: Heavy
    Codebits: all
    Targets: Fire A and Fire B
  • Trigger C
    Triggertype: Heavy
    Codebits: all
    Targets: Fire C and Fire D
  • Trigger D
    Triggertype: Heavy
    Codebits: all
    Targets: Fire E and Fire F
  • Trigger E
    Triggertype: Heavy
    Codebits: alle
    Targets: Fire G and Fire H
  • Rollingball
    Object: ROLLINGBALL
    Codebits: none activated
    Trigger: 1, Trigger A

In the real room, in which Lara is on the way, is only triggered the rollingball. Then that is activating all the torches one after another. So that they start to burn rearwards.

Triggering a chronological sequence of events:
Even though there is a timer setting in the trigger options which allows one to make an event happen only after a certain amount of time has elapsed, it is not possible to stack triggers with different timer values. Thus, if one wants to create a chain of consecutive events, this cannot be accomplished by using ordinary triggers. This is where the Rollingball comes in. One triggers only the boulder which then rolls down a slope, triggering Heavy Triggers for the individual events.
Triggering something using more than five triggers:
Since the codebits are limited, it is normally impossible to trigger something using more than five triggers. But, using the Rollingball trick, this problem can be solved. One simply triggers a Rollingball using up to five triggers, the Rollingball then triggering one of the target object’s codebits. This way, it is possible to use up to nine triggers for one event. Naturally, one can also trigger all of the remaining four triggers using Rollingballs which are, in turn, triggered by five separate triggers. This would result in 25 triggers, which should be enough for anyone.
For constantly switching something on and off:
you need two slopes which face each other. There must not be any flat square(s) between them. It should look similar to a halfpipe. At one end you must place the rolling ball. When it is triggered, it will start rolling down the slope; because of its momentum, it will continue its path up the opposite slope until it reaches the same height it has started at. There it will pause and start rolling down and back into its initial position again, a process which it will repeat indefinitely. If you add a “heavy"-trigger on one side and an “antiheavy"trigger on the other side they will alternately be triggered. For example you can make a door open and close in an endless loop. With the size of the halfpipe you are able to manipulate the time between the two triggered states.

5. Trigger stacking

The landscape inside the trle editor is divided into many quadratic squares. You can place a trigger on any of these squares. You can also place more than one trigger for different objects at the same square. That means you are stacking them. Surely all of you did that before. Even the easiest thing like opening a door with the help of a switch needs to be done by stacking two triggers: one trigger for the switch and one trigger for the door. All stacked triggers are going to be activated together at the same time.

Error

The error message, that special trigger hadn’t stack to on each other

However, the stacking has some rules, too. You will get mostly to know to them when you try out a good idea and you get an error like that: “Error: Cannot overlap Special Triggers.”

You are able to stack many triggers for different objects like doors, flame_emitters, enemies, effects and many more, but everything else like when the trigger is going to be activated or under which circumstances the trigger is going to be activated or how and how long the triggered object is going to be working, all these things can only be set once for each square. All other triggers added to that square are forced to use the same parameters.

Basically thing inside the editor are looking like that: There is always a “Special Trigger” if you stacked some triggers, which is the one you could call “alpha” or “leader”. All other triggers are following it. Which of the triggers is chosen to be the “special trigger” is not making any difference, but there can always be only one for each square. You will have to set all parameters at that trigger:

  • You can set a trigger type. That means you will set it to trigger, pad, switch, key, pickup, heavy, antipad, combat, dummy, antitrigger, heavyswitch, heavyantitrigger or monkey. The type defines trough whom and under which circumstances the trigger is going to be activated and in which way the object is going to be affected, it can be activated, deactivated or if chosen dummy, the object can be made walk able.
  • You can set the codebits. Look here.
  • You can set a timer value, which is controlling how long the object is active (if the value is a positive number) or how much time should pass before the object will be activated (if the value is a negative number).

You cannot change any of these settings for the other stacked triggers on this square. If you try that the editor will understand it as a second special trigger and you will get the above posted error message. You can only trigger other objects and leave their triggers untouched the way they are setting automatically. They will automatically adopt the settings, that have been made at the special trigger.

In other words, if you have a heavy trigger with activated codebits 1 & 2 and with a timer value 5 for a flame_emitter which is going to be activated when a shatter placed on it is going to be destroyed and you place a trigger for a door at the same square, then the door is going to be reacting the same way when the shatter is destroyed. That means for the door also codebit 1 & 2 are going to be activated for 5 seconds. For each next trigger you are going to place on the same square the result is going to be like that.


What can you gain from that? Well, there is a small advantage which allows the placing of triggers to be simpler, because you do not need to make the setting for each trigger manually. If you want to lit 20 flame_emitters with one switch, you don’t need to set every trigger to “switch”, you need to do that only with one trigger (usually the one for the switch itself).

As work and time saving this might be, many people could renounce the luxury, because it brings a big disadvantage with it:
For all actions, puzzles etc. it would be helpful or sometimes even needed to be allowed to set different settings for triggers sharing the same square. For example you want to open a door and off a fire when Lara walks on the same square, but how to stack the pad and anti on one square? Or another example, maybe you need for one object codebit 1 & 2 to be activated but the second object only needs codebit 5 to be activated. Or next example you want to activate an object if Lara steps on the square and something else if she pushes a box on the square, but how to combine the pad and heavy trigger? And maybe you want to activate enemies or sounds an a hanging bridge - or to use a switch on the bridge - but you can’t combine any trigger with the dummy trigger from the bridge.

All in all it is annoying. But there are some good news, at least some of the problems can be solved.


First of all you must learn to differentiate between the following two situations:

  • You need multiple triggers to be activated at the same time that will result in different effects.
  • You need triggers on one square, that are going to be activated by different events (like one if Lara steps on it, or another one if a rollingball pass it etc.)

5.1. Stacking Triggers which result in different effects

There is no easy trick to convince the editor to allow the stacking of different special triggers. But in most cases you believe you need that, it is not really needed. Because you can solve that problem in a different way. What is going to help us, is what we learned up to now: codebits, Trigger Triggerer and the rollingball trick (used in exactly that order). If one reaches a point, where one things stacking of special triggers is needed, one should check this points inside his/her head first. First of all check if you can solve it with using different codebit settings. If this is not going to work, then check if you can solve it with trigger triggerer. And the last one is the rollingball trick. The last one nearly always works. But don’t fall into illusions, there is not always a solution. Sometime you have to resign and accept that your idea can’t be solved properly.

Let’s have a look at some cases:

To activate one thing, and to deactivate another one:
There was a full chapter for that case inside the codebits. You should first try if you can’t do it in that way - if that isn’t possible you can mostly do it with the rollingball trick: You have to trigger all thing, which are going to be activated normally at you square then you will add a trigger for the rollingball. Under the rollingball you will use the heavyantitrigger for the objects, which need to be deactivated.
For one object only some codebits and for another one all codebits are going to be activated
In this case you don’t need to stack special triggers, either. For example you want to open a door with four triggers on the floor, that means you will set each trigger with a different codebit. Each trigger square of the four should also lit up a fire, so you would need to stack a trigger with all codebits activated normally, or? No! You just stack a normal trigger on them, which will automatically absorb the settings from the special trigger and will onl activate only that one codebit at the flame_emitter. But that is not any big deal, because you can activate the missing codebits from beginning on the object menu of each flame_emitter. That means the one missing codebit will be activated by the trigger.
Fine, but what if that is not going, for example because all codebits are already activated, because you need a flame that already burns and should go off if triggered? No problem, either. In that case you can place trigger somewhere, where the player must pass trough, where the missing codebits are already set to be activated.
Trigger with different timers:
Everything that has something to do with timers can be easily solved with the rolling ball trick. Look at “Triggering a chronological sequence of events”
Trigger with “One Shot" and without:
Pay attention if the trigger that is used for “One Shot” is used for a camera this is no any problem. That is because for the camera trigger there is one exception, you can set it as “One Shot” and it is not going to be turned into a special trigger.
If you use “One Shot” for something else, you should frist try to thing, if you cannot separate the triggers and place them on different fields. If that is the case, you can do it with the rollingball trick. You trigger the normal ones and the rollingball. Under the rolling ball you will place a heavy trigger for the object which needed the “One Shot” option. In this case you do not need to set the heavy trigger for the rollingball to “one Shot” again, because you can make the square to be aslope so the rollingball will not remain on it but pass by further down. That means he cannot activate the trigger more than one time.
  • Bridge part A
    Object: BRIDGE_TILT2
    Codebits: none activated
    Trigger: 1, Trigger A
  • Bridge part B
    Object: BRIDGE_TILT1
    Codebits: none activated
    Trigger: 1, Trigger B
  • Bridge part C
    Object: TWOBLOCK_PLATFORM
    Codebits: none activated
    OCB-Code: 1
    Trigger: 1, Trigger C
  • Bridge part D
    Object: BRIDGE_FLAT
    Codebits: none activated
    Trigger: 1, Trigger D
  • Bridge part E
    Object: BRIDGE_FLAT
    Codebits: none activated
    Trigger: 1, Trigger E
  • Bridge part F
    Object: BRIDGE_TILT1
    Codebits: none activated
    Trigger: 1, Trigger F
  • Bridge part G
    Object: BRIDGE_TILT2
    Codebits: none activated
    Trigger: 1, Trigger G
  • second bridge
    Objects: BRIDGE_FLAT
    Codebits: none activated
    Trigger: 2, Trigger D and H
  • Trigger A
    Triggertype: Dummy
    Codebits: all
    Targets: Bridge part A
  • Trigger B
    Triggertype: Dummy
    Codebits: all
    Targets: Bridge part B
  • Trigger C
    Triggertype: Trigger
    Codebits: all
    Targets: Bridge part C and Gegner
  • Trigger D
    Triggertype: Dummy
    Codebits: all
    Targets: Bridge part D and second bridge
  • Trigger E
    Triggertype: Dummy
    Codebits: all
    Targets: Bridge part E
  • Trigger F
    Triggertype: Dummy
    Codebits: all
    Targets: Bridge part F
  • Trigger G
    Triggertype: Dummy
    Codebits: all
    Targets: Bridge part G
  • Trigger H
    Triggertype: Dummy
    Codebits: all
    Targets: second bridge
  • Trigger H
    Triggertype: Dummy
    Codebits: all
    Targets: second bridge
  • Enemy
    Object: BADDY_2
    Codebits: none activated
    Trigger: 1, Trigger C

So you can have multiple Bridges on top of each other and you can trigger enemys on the bridge.

“Dummy”-Trigger and other triggertypes
Dummy trigger are a lot different from all other triggers. They do not really trigger anything, but they are essential for object, which Lara should be able to step on, for example for all bridge-objects. But that stops you from stacking other triggers an them.
If you want to put another bridge above the first, you don’t have any problem, because the editor will absorb the first parameters from your triggers. You just add the triggers for the second bridge on the top of the first.
If you need other trigger types to be activated on the bridge (like an enemy appear when Lara reaches the middle of a bridge) you have to use a trick. You have to open wadmerger, then you must copy your bridge-part from the “bridge_flat” slot to the “twoblock_plattform” slot. You can use the new object as a brigde part now. Put a “1” inside the ocb menu of the twoblock_plattform, so that it will not move. But it can also be interesting to leave the ocb to “0” if you use a rope (hanging) bridge, because it will move a little bit down if Lara steps on it. The difference now is, that Lara is also able to step on the twoblock_plattform if it is normally (not with dummy) triggered. You can add on this normal trigger your other wanted trigger and they will be all activated when Lara passes the bridge part.

5.2. Activating Stacked Triggers by different events

What if you need tos tack special triggers that are goinig tob e ativated by different events? In that case the help tricks from above don’t work. But there are many situations you want to have two different trigger types, one should be activated by a first condition, the other one by another second condition. Surely it would be practically, if that could work. Because there are many ways you could us it:

  • A small gap with two switches at the opposite sites. Both triggers need to share the same square, but only some conditions should be activated if you push the first switch and the other conditions if you push the second button.
  • A switch on the wall should activate something if pushed by Lara, but it should also be activated if a rollingball touched the square. You would need a “switch” and a “heavy” trigger at the same square.
  • There should be something different activated when Lara passes normal on the floor (“Pad”-trigger) then if she overcomes the floors by monkey bars (“Monkey”-trigger).
  • There should be something activated if a vase is shattered (“Heavy”-trigger) and a second different thing should be activated when Lara had picked up the things under the shattered vase (“Pickup”-trigger).

* …

You can imagine many different scenarios. But if you will try to just put the triggers above each other you will get an error message. But with the following trick, it is possible still to realize some things. The main idea is, that you have to divide the square into two triangular shaped ones. Both different special triggers will be placed separately on each of the two sides from the triangulated square. Of course you are limited with that trick, if you need a full square for your trigger. The other limit you reach is that you can still only place two different types on one square, if more are needed this won’t work anymore. Also it is forcing you maybe to rebuild the rooms, so the triangulated square fits into it, keep in mind that you can’t push any pushable on triangular squares.

5.2.1. Preparation

You have to modify the square before you place the trigger. The square on which the triggers should get stacked must be totally flat or at least have a flat triangle. Furthermore the flat triangle has to be on a room connection. However, it is advisable to work only with flat faces. Thus the further explanations will focus on this case. If you want to use a parted square you should try this composition and lift or lower one edge when everything is already working.

pyramid edge slope

On this shapes the trick does not work.

Certain shapes for the face are not possible. You cannot build pyramid edges where you activate one or another trigger by sliding to one or the other side. Normal slopes are also not possible.

Furthermore, the square has to be in a room connection. If the square is higher than the deepest point of the room, you have to part the height of the square, so the square is exactly in the connection. If the square is already at the floor, you only need to create another room with only one click heights, which is then placed and connected directly beneath the square.

  • Construction in upper room
    The red edge has “No Collision”
  • Construction in lower room
    at the ceiling
    The red edge has “No Collision”
  • Construction in lower room
    at the floor
    The floor have to liftet up afterwards.

Construction in both rooms. With dashed line aligned edges are on top of each other.

Let us work at the upper room. Here you select the square on which the triggers should get placed, and click on “floor” so you can work on the square. Then you lift the edge for one click. Now there is a diagonal which parts the square into two triangles. Which edge you lift depends on the position of the trigger. If you want to use two switches in the corner of a room, you have to lift one edge so the diagonal is going into the corner of the room. Now there should be a triangle directly in front of every wall. If you have lifted one edge, you simply set it to “No collision.” Right, the lifted edge and not the flat one! This triangle is now tinted deep red..

Now you change into the other room. If you have parted the original room there might be a wall. If that is the case, chose the square and click on “floor.” Look at the ceiling. The triangle, which is exactly beneath the flat triangle of the upper room, has to be lowered one click. Then you set “no collision” on the ceiling, but this time on the flat triangle, which is beneath the triangle of the upper room with “no collision.” Lower the edge of the triangle at the floor, which is beneath the triangle of the ceiling which is already lowered. Afterwards lift the whole square until it has contact with the ceiling. If you have done everything correctly there should not be a gap between the ceiling and the floor anymore.

Congratulations! The preparations are done.

5.2.2. Texturing

Texturing upTexturing down

Texturing. When you put on different textures in both rooms, you get a flat square with different texturized Triangles.

After the preparations there is a square which looks absolutely flat in the game, but is parted into two triangles. This is useful for texturing, because you can set to triangular textures on a flat surface. One is simply applied to the flat texture of the upper room and the other one on the flat triangle in the room beneath. The triangles with “No Collision” get textured with the transparency texture.

5.2.3. Set the Triggers

Now you can set the triggers. The trigger, which should get activated under other conditions is placed in the upper room, the other ones in the bottom room. The trick is using another trigger rule: Triggers must always be placed on the floor.

By parting the square into two triangles you have two floors. The flat triangle in the upper room is a floor. As long as something is placed at this half of the square it can activate triggers which are placed in the upper rooms. On the other half is “no collision” which makes the floor penetrable. This means this is not the floor in the upper room. Although the room is on exactly the same heights the bottom room is the floor on this side. Thus the triggers will get activated on this half, which are placed in the bottom room.

  • Trigger A
    Triggertype: Switch
    Codebits: all
    Targets: Switch A and other
  • Trigger B
    Triggertype: Switch
    Codebits: all
    Targets: Switch B and other
  • Switch A
    Object: SWITCH_TYPE2
    Codebits: none activated
    Trigger: 1, Trigger A
  • Switch B
    Object: SWITCH_TYPE2
    Codebits: none activated
    Trigger: 1, Trigger B

Construction in both rooms. With dashed line aligned edges are on top of each other.

You have to be careful with placing the triggers in one or the other room. The triggers for the switch, which are on the triangle without “No Collision”, must be placed in the upper room. The triggers for the lever on the triangle with “No Collision” must be placed in the bottom room. For the big lever switch on the floor the triggers must be placed on the side where Lara activates the lever. This means, this levers works only once, if on the other side is another trigger. The heavytrigger, which is activated by a shatter, must be placed in the upper room, the other trigger in the bottom room.

Of course you can block one of the triggers by a trigger triggerer without influencing the other trigger. You simply need to place the the trigger triggerer into the right room.

6. In the End

So I hope, everything was as far as understandable, and can help many people with their self made levels. To make these more exciting and more vitalizing, devoid of lost of hte own nerves.

Of course I couldn’t respond the every imponderabilities. But I hope this is a good beginnig. When you found a initiation you can puzzle out something else. Something what nobody has found before. Thus: Cheer up!

Who need’s anyway more help, can ask in the level editor forum at TRForge.net.

Then I would like to thank especially for their translations into English (in alphabetical order): Codo, Nutcake, Soul and TifaNazah. And thanks to all the others from the Advent calendar-team. ;-)


uranos1

Urheberrechtshinweis: Die vorliegende Publikation ist urheberrechtlich geschützt. Der Autor behält sich alle Rechte vor. Es ist gestattet den Text zum Zwecke des privaten Gebauchs zu speichern, kopieren oder auszudrucken. Eine Vervielfältigung, Verbreitung, Bereithaltung zum Abruf oder Online-Zugänglichmachung (Übernahme in andere Webseite) des Werkes, des Layouts der Webseite, sonstiger Inhalte (Bilder) ganz oder teilweise, in veränderter oder unveränderter Form ist nur nach vorheriger ausdrücklicher Zustimmung des Autors zulässig.
Tomb Raider und Lara Croft sind eingetragene Warenzeichen von Eidos Interactive Limited.