www.tombraiderforums.com

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Tomb Raider Level Editor Tutorials

Closed Thread
 
Thread Tools
Old 15-05-14, 17:17   #1
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,498
Default TRNG - Trigger interactions

“Interactions between the triggers” means that you cannot always do with a local trigger exactly what you want, because another local trigger will affect this trigger.

1. Direct interactions

An interaction is direct if the trigger that will be affected and the trigger that will affect the other one are overlapped with each other in the same trigger location.

The so-called “overlapping rules” that control the direct interactions:

Main rule:

You cannot overlap two or more “special” triggers with each other.

I.e. if you place more than one trigger on a floor square then that square can contain:

- maximum one special trigger, and
- any numbers of non-special (casual) triggers.

Special triggers are any (executable or condition) triggers:

- if the entry of Window Type is not TRIGGER, and/or
- if X or Y value is not 0 in the trigger name.

Casual triggers are any (executable) triggers:

- if the entry of Window Type is TRIGGER, and
- if X and Y value are both 0 in the trigger name.

X values are never 0 if Window Timer is not 0.
Y values are never 0 if One Shot is on and/or if any STT (Set Trigger Type panel) number button is off.

See more here about trigger windows, X and Y:
http://www.tombraiderforums.com/showthread.php?t=205352

If you click on the magenta button to place a special trigger on a square where another special trigger has been placed before, then you will get an error message.

So you can have on a floor square maximum one trigger with these values:

- Window Type entry is not TRIGGER, and/or
- Window Timer value (ID) is not 0, and/or
- One Shot is pushed, and/or
- at least one of the STT number buttons is released.

Except:

- You can have further triggers with a non-0 Window Timer value if those further triggers are ACTION, FLIPEFFECT or classic camera triggers. (Classic camera triggers are CAMERA triggers for static cameras plus OBJECT triggers for flyby cameras.)
- You can have further triggers with pushed One Shot button if those further triggers are classic camera triggers. (Technically these triggers also can have STT number buttons released, but number buttons are useless with classic camera triggers.)

All of these further triggers are still called casual triggers.

Adopting rule:

Casual triggers overlapped with special triggers will always adopt

- Window Trigger entry, and
- Window Timer value (ID), and
- One Shot on/off status, and
- STT number buttons on/off status

of the special trigger in the game, ignoring their own Window Trigger/Window Timer, One Shot/number buttons you adjusted in Room Editor.


An example to understand:
These triggers are on the same square:

ANTIPAD (OBJECT) to close door1, Timer=0, One Shot is pressed, Button 1-5 are pressed,
TRIGGER#1 (OBJECT) to open door2, Timer=0, One Shot is released, Button 1-5 are pressed,
TRIGGER#2 (OBJECT) to ignite a flame, Timer=0, One Shot is released, Button 1-5 are pressed.

That is what happens, only if Lara touches that square: the door1 and 2 will close at once and the flame will be put out at once. – But you can’t activate any of these triggers once again, after you opened the doors/ignited the flame with other triggers later.
So ANTIPAD will work exactly in the way as you adjusted, but TRIGGER#1 and TRIGGER#2 will work:

- as if they were ANTIPAD triggers, and
- as if they had One Shot button pressed.

Notes:

- Naturally if there is no special trigger in an overlap, then all the (casual) triggers of the overlap will do what you adjusted in them, not adopting anything.

- Overlaps work only on the overlapped squares, so there are no overlapping rules between the non-overlapped parts of the overlapped triggers.
For example, what if ANTIPAD has only one square in the example just above, but TRIGGER#1 has two squares, so only one of TRIGGER#1 squares can be overlapped with the only one square of ANTIPAD?
Well, on the overlapped square TRIGGER#1 will work as you see in that example. But if Lara gets into TRIGGER#1 trigger zone where that’s not overlapped with ANTIPAD, then TRIGGER#1 will work exactly as you adjusted that: as a TRIGGER, to open door2.
So this time TRIGGER#1 works like two different triggers.

- So if you want a One Shot pressed for a TRIGGER overlapped with a classic condition or a CONDITION, then you need to adjust it at that KEY, PICKUP, SWITCH, CONDITION.

- So if you want a timer or STT number buttons released for a TRIGGER overlapped with a classic condition, then you need to adjust it at that KEY, PICKUP, SWITCH. (CONDITION is an exception now, as I will tell below.)

- If you need non-0 Window Timer values, pressed One Shot or released STT number button statuses in the overlap then you need to adjust them at the special trigger, even if the special trigger itself can’t use them – but the casual triggers will adopt them to use them.
For example, you have a HEAVY SECRET trigger, and a TRIGGER OBJECT trigger overlapped with it. You’d like to time the OBJECT trigger, typing a value in Window Timer. According to the main rule, you can’t adjust that timer at the TRIGGER, only at the HEAVY.
So, the timer is adjusted at the HEAVY, though the HEAVY itself can’t use it for the SECRET (because Window Timer is useless for SECRET) – but this is the way to make the OBJECT trigger timed now.

- Perhaps there is an overlap like that: TRIGGER FLIPEFFECT having value in Window Timer, another TRIGGER FLIPEFFECT having value in Window Timer, plus a TRIGGER OBJECT with 0 in Window Timer.
The question is which of the FLIPEFFECTs is the special trigger, and which of them is a casual trigger? I.e. which FLIPEFFECT Window Timer value will be adopted as the timer of OBJECT? You don’t need to care about questions like that, because, in this kind of unsure cases, there won’t be a value adopted. – For further information, see the “exceptions” below.

-You can trick the adopting rule sometimes. – For example, these triggers are overlapped with each other:

COMBAT to make BADDY_1 come to life, Button 3 and 5 aren’t pressed, only Button1, 2 and 4 are pressed,
TRIGGER to open a door, all the number buttons are pressed – but the door has OCB Button 3 and 5 pressed.

So, TRIGGER adopts Button 1, 2 and 4 pressed, plus Button 3 and 5 released. But, thanks to the door object number buttons, there is a complete 1-2-3-4-5 series of the buttons pressed for the door, that’s why TRIGGER will work as if it hadn’t adopted the released status of Button 3 and 5. I.e., after all, the TRIGGER adopts only the COMBAT entry, so only the COMBAT trigger itself will use the released STT buttons, the TRIGGER will work as if all the STT number buttons had been pressed.
So, after activating the triggers in the overlap, the door has opened everyway, but the baddy has not come to life yet, you need to activate another trigger with Button 3 and 5 pressed to activate the baddy.

Exceptions to the adopting rule:

a, TRIGGER triggers overlapped with KEY, PICKUP, SWITCH, CONDITION triggers won’t adopt KEY, PICKUP, SWITCH, CONDITION Window Trigger entries.
So an executable trigger will never turn into a condition trigger.

b, Values won’t be adopted:

- in the case of One Shot or STT number buttons: if the casual trigger has no task for that value or
- in the case of Window Timer: if the casual trigger has no task for that value. Or if the casual trigger has a list in that window - so the casual trigger will use its own Window Timer now.

Examples:
= If a casual FLIPON is overlapped with a special trigger having One Shot pressed then the FLIPON won’t adopt that One Shot because the effect of One Shot is useless with FLIPON.
= A SWITCH special trigger has only 1 and 2 buttons pressed. There are a TRIGGER OBJECT for a door and a TRIGGER CAMERA overlapped with SWITCH.
The camera is aimed at the door. The OBJECT trigger will use the rule, adopting “the 1 and 2 only pressed” statuses, but the CAMERA trigger can’t adopt them. (Because number buttons are useless for CAMERA triggers.) So if Lara uses the switch then the door won’t move but the camera will show the unmoved door.
And there is a similar overlap as well: another switch with another SWITCH trigger (having only 3, 4 and 5 buttons pressed), overlapped with another TRIGGER OBJECT for the same door and another TRIGGER CAMERA for the same camera. If Lara also uses this switch after the first one then the door will open (adopting 3, 4 and 5 buttons pressed, so having all the number buttons pressed now for the setup) and the camera will show the door again, showing when it is opening.
= Values typed in Window Timer of SECRET triggers are useless, so a casual SECRET trigger will never adopt the Window Timer of the special trigger.
= The FLIPEFFECT trigger to clear the contents of a diary (F220) has a list in its Window Timer, so it will never adopt the Window Timer value of another trigger in an overlap.

c, TRIGGER casual triggers will never adopt the Window Timer value of ACTION or FLIPEFFECT or CONDITION special triggers.
So these TRIGGERs will always use the Window Timer value you adjusted in the TRIGGER itself.

Note:
Be careful if you have an ACTION or a FLIPEFFECT special trigger, with One Shot pressed and/or a/more STT number button(s) released, and if the casual trigger is a trigger that is able to use a value typed manually in Window Timer. Because sometimes it could be a buggy situation.
For example, I experienced that if a special ACTION has One Shot pressed and the casual trigger is a TRIGGER OBJECT, without a timer, then the ID of the Window Timer of that ACTION will be adopted into TRIGGER OBJECT Window Timer, as a timer for the object.

d, Classic camera triggers don’t really like adoptions:

- If you want a casual classic camera trigger in an overlap to have a non-0 Window Timer value and/or One Shot pushed status, then adjust them at the classic camera trigger, even if the special trigger has a non-0 Window Timer value and/or One Shot pushed status.
- On the other hand, the non-0 Window Timer value and/or One Shot pushed status of the special classic camera trigger will never be adopted by casual triggers in the overlap. (It is also true for the useless values of the classic camera triggers: STT number buttons, and – in the case of flyby cameras – Window Timer.)

e, STT number buttons are only technical in CONDITION special triggers – as I said in this tutorial:
http://www.tombraiderforums.com/showthread.php?t=205352
And they will be never be adopted by other triggers.

f, Sometimes the trigger type means something else for a given executable trigger. That is why, in these cases, two or more triggers in an overlap will be able to work with different trigger type meanings, though they have the same trigger type adjusted (at the special trigger) or adopted (at the casual triggers):

- one/some of the special/casual triggers will use the trigger type according to the original meaning,
- one/some of the special/casual triggers will use the trigger type according to the changed meaning.

For example, an ANTITRIGGER will work like a TRIGGER for FLIPEFFECTs. That is why it doesn’t matter if you use ANTITRIGGER or TRIGGER with FLIPEFFECTS. But if it is an OBJECT executable trigger then it matters if it is an ANTITRIGGER or a TRIGGER, because ANTITRIGGER will deactivate the object in that OBJECT, TRIGGER will activate it.
That is why if you want to deactivate the object of an OBJECT and activate a FLIPEFFECT on the same square, when Lara is in the common trigger zone, then place an ANTITRIGGER for the OBJECT and a TRIGGER for the FLIPEFFECT there. The TRIGGER will use the adopting rule, turning itself into an ANTITRIGGER, but that doesn’t matter now, because the FLIPEFFECT will be activated now, as if it remained a TRIGGER.

These are the possibilities:

- ANTITRIGGER, ANTIPAD, HEAVYANTITRIGGER are used to deactivate objects in executable OBJECT triggers.
If you use “anti” triggers with non-OBJECT triggers, then they will be used as TRIGGER, PAD, HEAVY, skipping the “anti” part of the trigger.
Except: the classic triggers to activate flyby sequences cannot use “anti” triggers. Use ACTION (A45) if you activate the flyby sequence with an “anti” trigger.

- Some non-Lara activators are able to use Lara’s triggers – as you see in this tutorial:
http://www.tombraiderforums.com/showthread.php?t=205381
But the meaning of some trigger types is changed in certain cases. - See eg. the ROLLINGBALL will use PAD triggers as if they were TRIGGER.

- If you use automatic activation (i.e. if the object is activated because all the number buttons are pressed in its OCB panel), then trigger effects will be inverted, till the deactivation of the object. (Eg. TRIGGERs will work like ANTITRIGGERs.)

- You can use TRIGGER, ANTITRIGGER, PAD, ANTIPAD, HEAVY, HEAVYANTITRIGGER or COMBAT under platforms, instead of DUMMY, to make collisions if the platform cannot be activated/deactivated.

- Standalone TARGET triggers (i.e. without overlapped with a camera trigger) will always work like TRIGGER triggers, choosing ANY (!) entry (including condition types, except: CONDITION) for them in Window Type.
(“Collision” “fake” FLIPEFFECT triggers also can have any entry, except: CONDITION, but these triggers are “fake”, so no values of them will be adopted. – Which doesn’t mean the main rule is not true for these triggers.)

g, A TIMER_FIELD trigger (either it is special or casual) is always useless by itself, you always need to use it in overlaps: we use this trigger to adjust another timer value of the overlapped OBJECT triggers, so the OBJECT will adopt the timer values of TIMER_FIELD: to its own Window Timer (whatever the original value is there), from the Window Object of the TIMER_FIELD.

Trigger order rule:

With or without a special trigger, the trigger order in overlaps mostly is not important, but sometimes it is.

I mean, sometimes it matters if Trigger A or Trigger B will be activated first in an overlap.
If your setup with that overlap fails then a possible reason is the triggers are placed there in the wrong order.

To know the actual trigger order, click more times on that square to select the triggers after each other.
If first Trigger A is selected and then Trigger B that means you placed Trigger B first and then you placed Trigger A.
But if first Trigger B is selected and then Trigger A that means you placed Trigger A first and then you placed Trigger B.

So:

- If you want a trigger will be selected sooner in an overlap then place that later than the other triggers there.
- If you want a trigger will be selected later in an overlap then place that sooner than the other triggers there.

Sometimes the trigger order in the overlaps will be re-arranged. (Mostly probably when you has just output the WAD.)
The order will be restored if you reload the project.
However, it is important only if you want some information for you about the trigger order in the Room Editor, i.e. these re-arrangements won’t affect anything in the game.

Neutral property rule:

If a trigger property affects only certain triggers then that property will be neutral for other triggers in the overlap.

Examples:

a, You can use a TRIGGER CD only once to play an audio (even without using One Shot button there) but you can use a TRIGGER OBJECT any times to open a door. – So this happens in an overlap with them:
= Lara gets into the common trigger zone of the two TRIGGERs at the first time. Now the door will open, the audio will play.
= After that, Lara activates a third trigger somewhere else to close the door.
= After that, Lara gets into the common trigger zone again. Now the door will open again – but the audio won’t play now.

So the fact, that you can activate that CD trigger only once even without One Shot, didn’t disturb the several activities of the other trigger.

b, There are two TRIGGERs overlapped, one is to open a door, the other one is to show a special camera shot:

= Lara gets into the common trigger zone at the first time. Now the door will open, the camera (while she’s in the trigger zone) will shoot.
= Later, Lara gets into the common trigger zone again. The door is opened now, but the camera (while she’s in the trigger zone) will shoot again.

So the fact, that the door is open (so you can’t open it again) didn’t disturb the usage of the camera.

c, There is a SWITCH trigger (timed for -10 seconds), overlapped with two TRIGGERs. One of the TRIGGERs is an OBJECT to open a door. The other one is an ACTION to turn an ANIMATING object. (As I said above, the ACTION won’t adopt the timer of the SWITCH: “the value won’t be adopted if the casual trigger has a list in Window Timer” – and Window Timer of ACTION triggers always have a list.)
If Lara uses the switch then the ANIMATING will be turned (not adopting -10), but – due to the negative timer – the door won’t do anything. In 10 seconds, the door will open, the ANIMATING – having been turned yet – won’t do anything.

2. Indirect interactions

An interaction is indirect if the trigger that will be affected and the trigger that will affect the other one are placed in different locations of the map.

The possible reasons are:

a, Evident circumstances. Eg. “if a door is open then you cannot open it”.
For example, there are two triggers to open the same door: a TRIGGER OBJECT and a PAD OBJECT. And there’s an ANTIPAD OBJECT trigger to close that door. – Let’s see two different proceedings:

- Lara gets into the zone of the TRIGGER. It opens the door. After that, you cannot open the door, because it’s open now. It means not only the TRIGGER is unusable now, but the PAD as well. If Lara steps on the ANTIPAD now to close the door, after that she can use either TRIGGER or PAD to open the door again. - Or
- Lara steps on the PAD. It opens the door. After that, you cannot open the door, because it’s open now. It means not only the PAD is unusable now, but the TRIGGER as well. If Lara steps on the ANTIPAD now to close the door, after that she can use either TRIGGER or PAD to open the door again.

b, The “trigger can be activated only once” situations.
For example, let’s reform the former example: press One Shot button at the PAD. – Let’s see two different proceedings:

- Lara gets into the zone of the TRIGGER. It opens the door. After that, you cannot open the door, because it’s open now. It means not only the TRIGGER is unusable now, but the PAD as well. However, if Lara steps on the PAD now, then the One Shot function will be accepted for the activation of that door.
So, if Lara steps on the ANTIPAD now to close the door, after that she can’t use either TRIGGER or PAD to open the door again. - Or
- Lara steps on the PAD. It opens the door. After that, you cannot open the door, because it’s open now. It means not only the PAD is unusable now, but the TRIGGER as well. If Lara steps on the ANTIPAD now to close the door, after that she can’t use either TRIGGER or PAD to open the door again, because that One Shot function of the PAD.

c, Timed situations.
For example, there are two TRIGGER OBJECTs to open the same door. One of them is to open that for 10 seconds, the other one doesn’t have a timer. – Let’s see two different proceedings:

- Lara gets into the zone of the TRIGGER with the timer. The door opens for the given time. Then she gets into the zone of the other TRIGGER, before the timer expires. That TRIGGER has no timer, so it says “open it permanently”. But it can’t open the door because it is already open. However, it removes the timer and the door remains open permanently. - Or
- Lara gets into the zone of the TRIGGER without the timer. The door opens. Now it should remain open permanently, but then Lara gets into the zone of the other TRIGGER to open a door for a given time. But it can’t open the door because it is already open. However, the timer starts, so the door will close after 10 seconds.

Now Type 7 seconds time in the Window Timer of the trigger without a timer.
For example, if Lara activated the TRIGGER with 10 seconds first, and then, after that, she activates the TRIGGER with 7 seconds (before the 10 seconds expires), it removes the 10 seconds timer and starts the 7 seconds timer to close the door after 7 seconds.

Another example: there are two TRIGGER OBJECTs to open the same door. One of them is to open that for 10 seconds, the other one has a negative timer for 7 seconds. – Let’s see two different proceedings:

- Lara gets into the zone of the TRIGGER with the positive timer. The door opens for the given time. Then she gets into the zone of the other TRIGGER, before the timer expires. It removes the positive timer, and closes the door at once, then opens it after 7 seconds. (Explanation: it closes it at once because the purpose of negative timers is to activate things after the given time, so, for the proper work of the negatively timed trigger, the door will automatically close when you activate the negatively timed trigger.) - Or
- Lara gets into the zone of the TRIGGER with the negative timer. Nothing happens until the given time. Then she gets into the zone of the other TRIGGER, before the timer expires. It removes the negative timer, and opens the door at once, for 10 seconds.

A well-known example for a similar situation:
Lara needs to jump on a flaming platform. Near that, there is a second platform that put outs the flame for a time, if Lara goes there. So Lara goes there, the flame will put out. If Lara leaves her place then the timer starts, so she needs to be in a hurry, to cross the first platform before that takes fire again.
In this case the flame has been activated previously. When Lara steps on the second platform, where a negatively timed PAD OBJECT trigger is placed, then the flame will be put out and the timer will start. But OBJECTs are so-called multiple triggers, so the timer will effectively start only in the moment when Lara steps off (or jumps up from) the second platform.

d, Situations with number buttons:
For example, you have three TRIGGER OBJECTs to open a door. One of the triggers has only 1 and 2 button pushed, another one has only 3, 4 and 5 button pushed, the third one has all the number button pushed. – Let’s see three different proceedings:

- Lara gets into the zone of the TRIGGER with the 1 and 2 pushed buttons. Now nothing will happen, because 3, 4 and 5 pushed buttons are still missing. Then Lara gets into the zone of the TRIGGER with the 3, 4 and 5 pushed buttons. Now the door will open, because all the buttons are already pushed now. After that, the third trigger with all the buttons pushed is unusable, because the door is already open.
- Lara gets into the zone of the TRIGGER with the 1 and 2 pushed buttons. Now nothing will happen, because 3, 4 and 5 pushed buttons are still missing. Then Lara gets into the zone of the TRIGGER with all the buttons pushed buttons. Now the door will open, because all the buttons are already pushed now. (I.e. the first trigger was unnecessary now.) After that, the third trigger with 3, 4 and 5 buttons pushed is unusable, because the door is already open.
- Lara gets into the zone of the TRIGGER with all the buttons pushed. Now the door will open, because all the buttons are already pushed now. After that, the other triggers are unusable, because the door is already open.

Note:
This number button interaction works in a bit different way with switches – see “Multi Switches to open Multi Doors” tutorial about the famous multidoor setup in TR1 Palace Midas.

e, Situations with switches:
Usually Lara can switch on a switch to activate something (eg. to open a door) and then switch it off to deactivate the same thing (eg. to close the door). For that purpose, only one executable trigger is overlapped with the SWITCH trigger: a TRIGGER OBJECT to open the door. – Let’s see two different proceedings:

- Before Lara uses the switch, another trigger activates the door. It will reverse the meaning of the door trigger under the switch: the switching-on of the switch will close the door and the switching-off of the switch will open the door.
- Lara switches on the switch to open the door, and then she activates an “anti” trigger to close it. After that, if she switches off the switch that will open the door again.

Made using TRNG 1.2.2.7.

Last edited by Titak; 09-09-15 at 16:43.
AkyV is offline  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 19:38.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.