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 14-05-14, 17:07   #1
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,493
Default TRNG Trigger activators

1. Activators for Lara’s triggers

Lara’s triggers are:

- COMBAT: if the activator is anywhere in the trigger zone (between floor and ceiling) and Lara has a weapon in the hand,
- TRIGGER: if the activator is anywhere in the trigger zone,
- ANTITRIGGER: if the activator is anywhere in the trigger zone (to deactivate objects),
- PAD: if the activator touches the floor is in the trigger zone,
- ANTIPAD: if the activator touches the floor in the trigger zone (to deactivate objects).

The possible activators are:

- Lara herself.
- See the classic setup of the mechanical scarab.
- For all the possible triggers: a MOTORBIKE or a JEEP, if Lara is driving it.
- For all the possible triggers (but PAD will work like TRIGGER, ANTIPAD will work like ANTITRIGGER):

= Flyby cameras in the title (the only activator for Lara’s triggers in the title!).
= Active ROLLINGBALL (with 64 typed in the OCB window).

- Only for TRIGGER/ANTITRIGGER:

= A MOTOR_BOAT or a RUBBER_BOAT, if Lara is driving it. (Type 4 in the OCB window of any boat if you want to disable this feature.)
= A KAYAK, not having 8 in its OCB window, if Lara is driving it.

I don’t mention DUMMY triggers now, because they are “only” for collision, and the possible activators are not the same. (For example, pushblocks are able to use platforms made solid by DUMMY triggers.)

2. Activator for others’ triggers

The others’ triggers are:

- HEAVY: use it usually,
- HEAVYANTITRIGGER: use it to deactivate objects,
- HEAVYSWITCH: it is a special HEAVY, for concrete activators. (I won’t detail this well-known TRLE feature now.)

Activators for HEAVY or HEAVYANTITRIGGER:


- Any Moveable object, having a NEF_EASY_HEAVY_ENABLING constant in an Enemy Script command, being in the trigger zone during its lifetime. (Maybe it doesn’t work with some objects. See eg. emitted creatures.)
- Any Static object, having 2048 in its OCB window, placed in the trigger zone – activates if Lara touches the object.
- Any Moveable or Static object, moved by a Parameters= PARAM_MOVE_ITEM Script command, which has a FMOV_HEAVY_ALL constant, being in the trigger zone when being moved. (A special version of this is a FMOV_HEAVY_AT_END constant in the command.)
- Any SHATTER object or any other Static object working like a SHATTER (see Customize= CUST_SHATTER_RANGE Script command), if it’s placed in the trigger zone, and Lara/anybody else/anything else shatters it.
- Any SHATTER or any other Static object, if it’s placed in the trigger zone, and an F160 trigger will shatter it or an F180 trigger will explode it.
- Any creature moving between two AI_AMBUSH nullmeshes, reaching the second AI_AMBUSH, if the trigger is placed on the same square where that AI_AMBUSH is. (Not all the creatures are able to use AI_AMBUSH objects.)
- Any creature moving between AI_PATROL nullmeshes, reaching the second AI_PATROL1 or the only one AI_PATROL2, if the trigger is placed on the same square where that AI_PATROL is. (Not all the creatures are able to use AI_PATROL objects.)
- A GUIDE, a VON_CROY or an ENEMY_JEEP object, reaching an AI_FOLLOW nullmesh on his/its route, if the trigger is placed on the same square where that AI_FOLLOW is.
- An AHMET object, being in the trigger zone during his lifetime.
- A SPHINX object, if he “butts and stops” suddenly in the trigger zone. (See the proper animation in WADMerger.)
- A BABOON_NORMAL object in the “monkey switch” setup. (See more about it in the related Monkey Switch Setup tutorial.)
- A MOTORBIKE or a JEEP, while Lara is riding/driving it in the trigger zone.
- A MOTOR_BOAT or a RUBBER_BOAT object, while Lara is driving it in the trigger zone. (Type 2 in the OCB window of any boat if you want to disable them to activate these triggers.)
- A KAYAK object, having 8 in its OCB window, while Lara is driving it in the trigger zone.
- A ROLLINGBALL object activated, being in the trigger zone.
- The flaming torch (in Lara’s hand) if there is a flame object on a square, with a HEAVY to activate that flame. The player must hit CTRL there for the activation (i.e. to make Lara touch the torch to the flame object).
- A FIREROPE object. If it has been burned away then it activates the trigger on the same square.
- An ELEMENT_PUZZLE object (scales), placed in the trigger zone, if Lara has poured water/dirt in the scale or if she has lit the petrol in the scale. (The old ELEMENT_PUZZLE savegame bug of TRLE has been fixed in TRNG!)
- Any PUSHABLE_OBJECT, if Lara pushes/pulls it onto the middle of the trigger square. (It doesn’t work if Lara moves the pushblock continuously over the whole trigger square.) – SAS_DRAG_BLOKE object is something similar.
- Any Moveable object, being a leading actor of a demo type cutscene, being in the trigger zone during its lifetime.
- A STATUE_PLINTH object, as a special receptacle, placed in the trigger zone – activates if Lara inserts a PUZZLE_ITEM5. (Buggy thing, because the inserted look of the item won’t be saved in savegames.)
- A flyby camera, having Button 14 pressed in its OCB panel, placed in the trigger zone – activates when the flyby sequence just reaches this camera.
- Exceptionally Lara as well, if the animation reaches a frame having F101 trigger (exported AnimCommand) when Lara is in the trigger zone.

Notes:

- You can try to modify those behaviors if you use a NEF_EASY_HEAVY_ENABLING constant in an Enemy Script command for the given activator. For example, I experienced that a PUSHABLE_OBJECT having that constant will activate the trigger in the moment when the whole object part that touches the floor is already on the trigger square, while being pushed/pulled onto the trigger square.

- If you want to place the non-Lara activators in the zone of a HEAVY/HEAVYANTITRIGGER trigger in Room Editor, then read carefully the descriptions above. – For example:
= A pushblock will activate only if it has just been pushed/pulled onto the middle of the square. So eg. if a pushblock is placed on a HEAVY in Room Editor, then nothing will happen if you start the level. You need to push/pull the block off the trigger and then push/pull back on it to activate the trigger.
= A ROLLINGBALL will activate only if it is active. So eg. if you place the ROLLINGBALL on a HEAVY in Room Editor, then it will activate the HEAVY only in the moment when you activate that boulder.

- I mentioned “moving” Moveable objects above. Don’t forget: the “active object” and the “moving object” are not the same notions, because eg. a pushblock is moving when being pushed/pulled, but never active. (Because we never activate it with a trigger.)
If a non-active but moving object doesn’t want to activate a HEAVY/HEAVYANTITRIGGER (though, seeing “the activator list” above, it should to activate it), then activate an A94 trigger. If you want the object to ignore the HEAVY/HEAVYANTITRIGGER triggers again, then activate an A95.

Activators for HEAVYSWITCH:

Usually you use pushblocks to activate HEAVYSWITCH triggers. – See a complex version of this pushblock setup in the classic “Lost Library pushable planets” setup. (You can find the description in this TRF tutorial: “ Lightning and sparks”.)

Other activators for HEAVYSWITCH:

- See original TRLE project catacomb.prj Room146 and the adjacent rooms for the shootable bones. You need to shoot all the bones to activate the block with HEAVY triggers. This kind of “multitrigger” setups work only with HEAVYSWITCH, if you shoot at breakable switches (SWITCH_TYPE7) or shootable switches (SWITCH_TYPE8).
STATUE_PLINTH also need HEAVYSWITCH for a multitrigger setup.
- See the setup of Scales Puzzle. (In the description of the Scales Puzzle tutorial.)

Other methods for concrete activators:

You can use GlobalTriggers, if you want something to happen, only if somebody/something, who/that is not Lara, is doing something:
GlobalTrigger condition TriggerGroup: “if the (non-Lara) object does this”.
GlobalTrigger executable TriggerGroup: “then the game will do that”.

But if you want a local HEAVY to activate/deactivate something only if a given activator activates that HEAVY, then you need to use variables. For example, use this setup:

HEAVY trigger placed in the map to activate an F118.
That F118 activates a TriggerGroup that contains these triggers, in this order:

- Trigger1: An F244 to put the actual value of “TRNG Index. Index of last item to have enabled a trigger (Short)” Savegame Memory Zone field into Current Value variable. This value is the tomb (game) index of the object that just is in the trigger zone of that HEAVY.
- Trigger2: An F300 will transform the tomb (game) index in Current Value into the usual NGLE (Room Editor) object index you can see in the map.
- Trigger3: A C40 will compare a PARAM_BIG_NUMBERS value (which is the NGLE index of the required activator object) to the actual value of Current Value.
- Trigger4: The required trigger you want to execute if that activator activates that HEAVY.

Be careful, if more than one activator can be in the trigger zone of the HEAVY in the same time. Because, if the good activator gets into the trigger zone when the bad activator is still there, then the setup will fail.

Note:
NEF_EASY_HEAVY_ENABLING is necessary for the proper working of this, even if the object is able to activate HEAVY triggers by default, without NEF_EASY_HEAVY_ENABLING.
And it is still not a guarantee, you need to test it!

3. Concrete AnimCommand activators

Usually any object of an object slot will perform an AnimCommand.
Perhaps you think, when you want only a given object of an object slot to perform an exported AnimCommand, then you can adjust it when you change “No” or “Yes”, when you adjust the ACTION AnimCommand in STT (Set Type Trigger panel).
No, that is not true. That “No” or “Yes” are for something else. (If you’ve chosen “No”, then the AnimCommand will affect only the object named in the trigger, or if you’ve chosen “Yes”, then the AnimCommand will affect the actual object that is just performing that AnimCommand.)

If you want only a given object of an object slot to perform an exported AnimCommand (either that is an ACTION or a FLIPEFFECT), not performing it with the other objects of the slot, then don’t export that trigger as an AnimCommand. Instead, type this into the Script:

GlobalTrigger= 1, IGNORE, GT_CONDITION_GROUP, IGNORE, 1, 2, IGNORE
TriggerGroup= 1, Trigger1, Trigger2, Trigger3
TriggerGroup= 2, Trigger4

- Trigger1: an A54 will define the required object for Item Memory Zone.
- Trigger2: an F256 will put the “Frame Now (warning it's an abs value) (Short)” Item Memory Zone field into a Short variable.
- Trigger3: a C40 compares a PARAM_BIG_NUMBERS number to actual the value of that variable.
- Trigger4: the trigger that you wanted to export originally as an AnimCommand.

This GlobalTrigger will activate Trigger4 if the given object is just performing a given absolute frame. – This absolute frame ID is what you need to type in that PARAM_BIG_NUMBERS number.
Absolute frames always calculate all the actual animations of the object, as if all the animations were only one, huge animation. I.e. each absolute animation frame shows up only once in the case of that object. So eg. the absolute frame with ID=567 at that object doesn’t belong to a concrete animation, it belongs to that object, there is no other Absolute Frame 567 of that object.

For example you’d like to know the absolute ID of Frame 8 of Animation 18 of BADDY_1. (This is the animation when the baddy is just standing immovably.) Then open that WAD in NG Center\Tools\Animation Watcher, in “Show PRESENT ANIMATIONS for current slot” mode. Choose BADDY_1 slot then see “Anim” column. Choose the line of 18 (i.e. the line of Animation 18). See the green window below, searching for “FrameStart” line. The value here is the Absolute Frame ID of Frame 0 of that animation. For example, you’ll see 400 there now. 0+8=8, so 400+8=408, i.e. the absolute ID of Frame 8 of Animation 18 of BADDY_1 is 408 now.

Be careful! Adding/removing frames/animations to/from that object may change that absolute frame index.
So you should check absolute frames each time when you changed that object in the WAD.

Note:
I don’t recommend “TRNG Index. Index of moveable performing last AnimComand (Short)” Savegame Memory Zone field for the same reason, because that field is updated only if an object performs that AnimCommand. (I.e. the field will show the object index that activates that AnimCommand or that activated last that AnimCommand.)

Made using TRNG 1.2.2.7.

Last edited by AkyV; 12-05-17 at 17:30.
AkyV is online now  
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 17:42.


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