Hidden Triggers in TRNG
by AkyV

Page 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16

7. Multisubject

 

Usually each combination has only one, constant subject. (For example: Object X is the constant subject, whatever happens.)

We are talking about multisubject if the combination has only one subject, but it can be any subject, we still don't know which one that will be. (For example: Object X, Object Y and Object Z can be the only one subject of the combination, and a happening later will define if the subject is Object X or Object Y or Object Z.)

You need to use one of these three Savegame Memory Zone fields if you want to use multisubject mode:

 

- 'TRNG Index. Item Index for Selected Item Memory (Short)' field if we use a multisubject (i.e. multiobject) in Item Memory Zone.

- 'TRNG Index. Slot Index for Selected Slot Memory (Short)' field if we use a multisubject (i.e. multislot) in Slot Memory Zone.

- 'TRNG Index. Animation Index for Selected Animation Memory (Short)' field if we use a multisubject (i.e. multianimation) in Animation Memory Zone.

 

Never use the multisubject mode if you need a continuous force!

 

7.1. Transforming combinations into multiobject mode in Item Memory Zone

 

a, Executable combination: 

 

The Item Memory Zone executable basic formula must look like this way in multiobject mode:

 

- with variables:

 

Trigger1. An F301 to transform the Room Editor index of the object in Current Value into game index.

Trigger2. An A54 to define the actual subject of Item Memory Zone. An F245 to force Current Value value into 'TRNG Index. Item Index for Selected Item Memory (Short)' field.

Trigger3. An F232/F252/F263 to put a value into the chosen variable.

Trigger4. An F257 to force the chosen variable value into the chosen field.

 

- without variables:

 

Trigger1. An F301 to transform the Room Editor index of the object in Current Value into game index.

Trigger2. An A54 to define the actual subject of Item Memory Zone. An F245 to force Current Value value into 'TRNG Index. Item Index for Selected Item Memory (Short)' field.

Trigger3. An F255/F261 to put a value into the chosen field.

 

The value of Current Value will be 'X object' this time. (F301 is needful because 'TRNG Index. Item Index for Selected Item Memory (Short)' field uses the game index of the object.)

 

Let's see an example how we can transform an Item Memory Zone executable combination into multiobject mode:

Chapter 1.1.9. Executable combination (1) to force new life points on an enemy:

 

Let's say there are two F232 (or F263) triggers placed in the different points of the level to force a value into Current Value variable:

 

- The value in one of the triggers means the Room Editor object ID of a BADDY_1.

- The value in the other trigger means the Room Editor object ID of another BADDY_1.

 

Lara will activate only one of the triggers.

After that, Lara activates the combination. F301 and then F245 will define that object game index as the subject of Item Memory Zone.

So if Lara activated F232 (F263) for the ID of BADDY_1 'A' then it's him who will get new life points now, but if she activated F232 (F263) for the ID of BADDY_1 'B' then it's him who will get new life points now.

 

b, Condition combination:

 

The Item Memory Zone condition basic formula must look like this way in multiobject mode:

 

Trigger1. An F301 to transform the Room Editor index of the object in Current Value into game index.

Trigger2. An A54 to define the actual subject of Item Memory Zone. An F245 to force Current Value value into 'TRNG Index. Item Index for Selected Item Memory (Short)' field.

Trigger3. An F256 to put the value of the chosen memory zone field into the chosen variable.

Trigger4. A C40/C43 trigger to study the chosen variable value

 

Let's see an example how we can transform an Item Memory Zone condition combination into multiobject mode:

Chapter 1.1.21. Condition combination to study the value of the blue ambience light shining on an object:

 

Let's say there are two F232 (or F263) triggers placed in the different points of the level to force a value into Current Value variable:

 

- The value in one of the triggers means the Room Editor object ID of the DOG.

- The value in the other trigger means the Room Editor object ID of the WILD_BOAR.

 

Lara will activate only one F232 (F263) of them.

After that, Lara starts the combination. F301 and then F245 will define that object game index as the subject of Item Memory Zone.

So if Lara activated F232 (F263) for the ID of DOG then this animal is the one that will be studied now, but if she activated F232 (F263) for the ID of WILD_BOAR then this animal is the one that will be studied now.

 

7.2. Transforming combinations into multislot mode in Slot Memory Zone

 

a, Executable combination:

 

The Slot Memory Zone executable basic formula must look like this way in multislot mode:

 

Trigger1. An F292 to define the actual subject of Slot Memory Zone. An F245 to force another variable value into 'TRNG Index. Slot Index for Selected Slot Memory (Short)' field.

Trigger2. An F232/F252/F263 to put a value into the chosen variable.

Trigger3. An F294 to force the chosen variable value into the chosen field.

 

The value of 'another variable' will be 'X object slot' this time.

 

Let's see an example how we can transform a Slot Memory Zone executable combination into multislot mode:

Chapter 4.4. Executable combination to force a new shadow size on an object slot:

 

Let's say there are two F232 triggers placed in the different points of the level, to force a value into 'another' variable:

 

- The value in one of the triggers means the slot ID of BADDY_1.

- The value in the other trigger means the slot ID of BADDY_2.

 

Lara will activate only one of those F232 triggers.

After that, Lara activates the combination. F245 will define that object slot index as the subject of Slot Memory Zone.

So if Lara activated F232 for the ID of BADDY_1 then it's them who will have resized shadow now, but if she activated F232 for the ID of BADDY_2 then it's them who will have resized shadow now.

 

b, Condition combination:

 

The Slot Memory Zone condition basic formula must look like this way in multislot mode:

 

Trigger1. An F292 to define the actual subject of Slot Memory Zone. An F245 to force another variable value into 'TRNG Index. Slot Index for Selected Slot Memory (Short)' field.

Trigger2. An F293 to put the value of the chosen memory zone field into the chosen variable.

Trigger3. A C40/C43 trigger to study the chosen variable value.

 

Let's see an example how we can transform a Slot Memory Zone condition combination into multislot mode:

Chapter 4.7. Condition combination to study the distance when the objects will be changed for MIP objects:

 

Let's say there are two F263 triggers placed in the different points of the level, to force a value into 'another' variable:

 

- The value in one of the triggers means the slot ID of ANIMATING6.

- The value in the other trigger means the slot ID of ANIMATING10.

 

Lara will activate only one of those F263 triggers.

After that, Lara starts the combination. F245 will define that object slot index as the subject of Slot Memory Zone.

So if Lara activated F263 for the ID of ANIMATING6 then this object slot is the one that will be studied now, but if she activated F263 for the ID of ANIMATING10 then this object slot is the one that will be studied now.

 

7.3. Transforming combinations into multianimation mode in Animation Memory Zone

 

a, Executable combination:

 

The Animation Memory Zone executable basic formula must look like this way in multianimation mode:

 

Trigger1. An F307 to define the actual subject of Animation Memory Zone. An F245 to force another variable value into 'TRNG Index. Animation Index for Selected Animation Memory (Short)' field.

 Trigger2. An F232/F252/F263 to put a value into the chosen variable.

Trigger3. An F296 to force the chosen variable value into the chosen field.

 

The value of 'another variable' will be 'X absolute animation ID' this time.

 

Let's see an example how we can transform an Animation Memory Zone executable combination into multianimation mode:

Chapter 5.4. Executable combination to force a new frame rate on an animation:

 

Let's say there are two F263 triggers placed in the different points of the level, to force a value into 'another' variable:

 

- The 226 value in one of the triggers means absolute animation ID 226.

- The 228 value in the other trigger means absolute animation ID 228.

 

Lara will activate only one of those F263 triggers.

After that, Lara activates the combination. F245 will define that absolute animation index as the subject of Animation Memory Zone.

So if Lara activated F263 for Animation226 then it's what will have a new frame rate now, but if she activated F263 for Animation228 then it's what will have a new frame rate now.

 

b, Condition combination: 

 

The Animation Memory Zone condition basic formula must look like this way in multianimation mode:

 

Trigger1. An F307 to define the actual subject of Animation Memory Zone. An F245 to force another variable value into 'TRNG Index. Animation Index for Selected Animation Memory (Short)' field.

Trigger2. An F295 to put the value of the chosen memory zone field into the chosen variable.

Trigger3. A C40/C43 trigger to study the chosen variable value.

 

Let's see an example how we can transform an Animation Memory Zone condition combination into multianimation mode:

Chapter 5.11. Condition combination to study the State ID of the animation:

 

Let's say there are an F232 and an F263 trigger placed in the different points of the level, to force a value into 'another' variable:

 

- The 50 value in F232 trigger means absolute animation ID 50.

- The 234 value in F263 trigger means absolute animation ID 234.

 

Lara will activate only one of those triggers.

After that, Lara starts the combination. F245 will define that absolute animation index as the subject of Animation Memory Zone.

So if Lara activated F232 for Animation50 then it's what will be studied now, but if she activated F263 for Animation234 then it's what will be studied now.

 

7.4. Item Memory Zone combinations being useful only in multiobject mode

 

As I said above, there can be Item Memory Zone combinations which aren't necessary because we can have regular triggers instead of them.

But the regular triggers works only with one, constant subject, so it's worth using those combinations in multiobject mode:

 

7.4.1. The name of the field:

Animation Now (Number of current animation) (Short)

 

Condition combination:

If the actual animation of (X) Moveable object is (A) (only in multiobject mode)

 

A: 'equal' absolute animation ID

Type: simple.

 

Notes:

- You can examine only these animations of Lara:

 

= LARA object animations,

= animations of other objects that are not connected to LARA object (see mostly VEHICLE_EXTRA and similar animations).*

 

So eg. you can't examine SHOTGUN_ANIM animations, because Lara also performs an animation of LARA object when shooting with the shotgun. So if she's shooting with the shotgun then always the actual animation of LARA object will be examined.

*: Though these absolute animations indices belong to VEHICLE_EXTRA etc. objects, the X value must be the index of the placed LARA object.

- Use C30 (in the case of Lara) or C21, C22, C24 (in the case of other objects) if it is not multiobject mode.

- The executable version of this formula seems (more or less) buggy. So use only F77, F80, F169, F170, F171 (in the case of Lara) or A15, A16, A17 (in the case of other objects) to force an animation.

 

7.4.2. The name of the field:

Contact Flags ($2400 = damage lara on touching) (Long)

 

Condition combination:

If Lara (A) is/is not colliding with (X) Moveable object (only in multiobject mode)

 

A:

'equal'

0: not colliding

0, with TGROUP_NOT flag in the condition trigger: colliding

Type: simple.

 

Note:

Use C26 if it is not a multiobject mode.

 

7.4.3. The name of the field:

Custom Flags (Different flags in according with object type) (Byte)

 

Executable combination:

Deactivate (X) Moveable object (only in multiobject mode)

 

Y: 0

Force: single.

 

Note:

Use the regular antitriggering if it is not a multiobject mode.

 

7.4.4. The name of the field:

OCB Code (The value you typed in OCB of this item) (Short)

 

Executable combination:

Force (Y) OCB code typed for (X) Moveable object (only in multiobject mode)

 

Y: from 1 to any

Force: single.

 

Note:

See more about that in Chapter 1.1.10.

 

7.4.5. The name of the field:

Slot Id (number of slot) (Short)

 

Condition combination:

If the slot ID of (X) Moveable object is (A) (only in multiobject mode)

 

A: 'equal' from 1 to any

Type: simple.

 

Notes:

- This combination is useless in non-multiobject mode. I mean, if you have a one and constant object then the slot is also constant, you don't need to study what that is.

- See slot ID's here: NG Center\Reference\Slot Moveables indices list.

 

7.4.6. The name of the field:

Transparence level (0 = opaque / 126 transparent / over 127 removes item) (Short)

 

Executable combination:

Force (Y) transparency level on (X) Moveable object (only in multiobject mode)

 

Y: 0 (opaque), from 1 (minimum transparency) to 126 (maximum transparency)

Force: continuous. When stopping it: the object will be fading away and disappear ('killed') - which is considered as a bug now.

 

Notes:

- Always force continuously. And, if you changed the transparency level with this combination, then you cannot stop forcing ever.

So, eg. if you want to get back the opaque object then don't stop forcing. Instead of that, start forcing 0.

- Use A53 if it is not a multiobject mode.

 

Condition combination:

If the transparency level of (X) Moveable object is (A) (only in multiobject mode)

 

A: 0 (opaque), from 1 (minimum transparency) to 126 (maximum transparency)

Type: sequence.

 

Notes:

- Use C37 if it is not a multiobject mode.

- In fact, 'more' and 'less' modes are also useful in non-multiobject mode, because C37 is unable to work in 'more' or 'less' mode.

 

7.4.7. The name of the field:

Unknown Countdown (Some counter, not yet discovered) (Short)

 

Executable combination:

Force (Y) frames to the timer of (X) Moveable object (only in multiobject mode)

 

Y: negative numbers, positive numbers, 0

Force: single.

 

Notes:

- So this combination is a combination for the good old timer we type in the Timer box of Set Trigger Type panel.

- Use the regular timed triggers if it is not a multiobject mode.

- You can force the time even if the object isn't timed. If you force the time, then the timer starts at once from that value, counting to 0.

- The combination is useful only if the object is just active.

 

7.4.8. The name of the field:

Visible Mesh Flags (each mesh a different bit) (Long)

 

Executable combination:

Turn (Y) meshes of (X) Moveable object into visible/invisible (only in multiobject mode)

 

Y: 1 plus T

W: variable ID (any Long)

T:

Each mesh of the object has a codebit in this field. - It is easy to understand:

 

All the meshes are visible: 0

Only Mesh0 is invisible: Bit 0=Value 1

Only Mesh1 is invisible: Bit 1=Value 2

Only Mesh2 is invisible: Bit 2=Value 4

Only Mesh3 is invisible: Bit 3=Value 8

Etc.

 

If more meshes are invisible at the same time, then their aggregate what matters.

So, for example, if only Mesh2 and Mesh4 are invisible, then the value is 1+Bit 2+Bit 4= 1+4+16=21.

Force: single.

 

Notes:

- Use F284 to invert the sign in the chosen variable. (Because of technical reasons I don't explain it now.) Place that F284 exactly before the last trigger in the TriggerGroup.

- See more about that in Chapter 1.1.29.

 

7.5. Slot Memory Zone combinations being useful only in multislot mode

 

As I said above, there can be Slot Memory Zone combinations which aren't necessary because we can have regular triggers instead of them.

But the regular triggers works only with one, constant subject, so it's worth using those combinations in multislot mode:

 

7.5.1. The name of the field:

HP. Max Vitality at start (Short)

 

Condition combination:

If the maximum life points of (X) Moveable object slot is (A) (only in multislot mode)

 

A: from 1 to any

Type: sequence.

 

Notes:

- Naturally each enemy will have its maximum vitality when comes to life.

- You can change the value of the maximum vitality of a slot in an Enemy Script command.

- As the maximum vitality of a slot is constant in the game, that's why it's worth using this combination only in multislot mode. (I mean, if you have a one and constant slot then the maximum vitality is also constant, you don't need to study what that is.)

 

7.6. Animation Memory Zone combinations being useful only in multianimation mode

 

As I said above, there can be Animation Memory Zone combinations which aren't necessary because we can have regular triggers instead of them.

But the regular triggers works only with one, constant subject, so it's worth using those combinations in multianimation mode:

 

7.6.1. The name of the field:

Next Animation index (Short)

 

Condition combination:

If (X) animation has (A) next animation (only in multianimation mode)

 

A: 'equal' absolute animation ID

Type: simple.

 

Note:

As the 'Next Animation' of an animation is constant in the game, that's why it's worth using this combination only in multianimation mode. (I mean, if you have a one and constant animation then the next animation is also constant, you don't need to study what that is.)

 

7.7. Defining multisubject with other methods

 

Let's see some other methods to create a multisubject situation:

 

1. There are some condition combinations which examine things which can be subjects in some memory zones: objects, object slots, animations, inventory item ID's.

So you can use those combinations to define a subject for another combination. All you need is to combine a part of that condition combination with the original multisubject method.

See for example Chapter 1.1.15., the condition about the horizontal speed:

 

1. First, transform its formula into multiobject mode.

2. Then see for example Chapter 2.51.: this condition combination will study the last Moveable object that Lara was interacting with:

Start the 2.51. combination, but first, remove the condition trigger part. (So you need now only those two executable trigger in the condition.) The solution: the combination puts the object 'Room Editor' ID into Current Value variable.

3. Then start the 1.1.15. multiobject combination, that will studies the object 'Room Editor' ID in Current Value.

 

Originally 1.1.15. condition means this: 'If the actual horizontal speed of (X) Moveable object is (A)'.

But with that 'condition-less' 2.51. together, the 1.1.15. condition means this: 'If the last Moveable object that Lara was interacting with has (A) horizontal speed'. - Use it eg. if there are more vehicles are placed in the level.

 

2. See TGROUP  INDEX Script flags. See example TGROUP_USE_EXECUTOR_ITEM_INDEX:

Let's see eg. 1.5.1. Executable combination (2) that will give a given amount of ammunition to a Baddy_1:

Modify it, attaching TGROUP_USE_EXECUTOR_ITEM_INDEX flag to A54 trigger.

 

Now X could be any object. Unimportant what it is.

The setup is this, for example:

Use an Enemy Script command for Baddy_1 that will make him be able to activate HEAVY triggers. (I.e. use NEF_EASY_HEAVY_ENABLING Script flag.)

Then place an F118 in the map to activate the TriggerGroup containing that modified combination. (Eg. Y=200 bullets.)

Start the game. Let's say three Baddy_1 enemies start sauntering in the room with the HEAVY trigger. They have ID 18, ID 27 and ID 65.

TGROUP_USE_EXECUTOR_ITEM_INDEX causes the HEAVY trigger will work on the object that activates it.

So if BADDY_1 ID 18 activates the combination then it's him who will get 200 Uzi bullets - any time when he crosses the trigger.

Or if BADDY_1 ID 27 activates the combination then it's him who will get 200 Uzi bullets - any time when he crosses the trigger.

Or if BADDY_1 ID 65 activates the combination then it's him who will get 200 Uzi bullets - any time when he crosses the trigger.

Or if all of them cross the trigger sooner or later then all of them will get 200 Uzi bullets sooner or later - any time when they cross the trigger.

 

3. And there is a very simple method, when you use more non-multisubject formulas. - See that example above again about the life points:

 

Let's say there are two F232 triggers placed in the different points of the level:

 

- The first F232 forces the object Room Editor ID (32) of a BADDY_1 into 'another' variable.

- The second F232 forces the object Room Editor ID (47) of another BADDY_1 into 'another' variable.

 

Lara will activate only one F232 of them.

After that, Lara activates the combination - that looks this way now:

 

Trigger1. An F232/F263 to put the required life point into the chosen variable.

Trigger2. A C40 will study in 'another variable' if object ID is 32.

Trigger3. If ID is 32 then A54 defines BADDY_1 ID32 as the subject of the memory zone.

Trigger4. An F257 to force the chosen variable value (life points) into the chosen field, giving the life point to BADDY_1 ID 32.

Trigger5. Or else a C40 will study in 'another variable' if object ID is 47.

Trigger6. If ID is 47 then A54 defines BADDY_1 ID47 as the subject of the memory zone.

Trigger7. An F257 to force the chosen variable value (life points) into the chosen field, giving the life point to BADDY_1 ID 47.

 

7.8. Simulating multisubject mode with regular triggers

 

Though it is a bit offtopic, we are able to use some multisubject methods with the regular triggers as well. - For example:

 

1.

A14 trigger will kill an enemy. But if you use this trigger with TGROUP_USE_EXECUTOR_ITEM_INDEX, in HEAVY way, then always the object will be killed that activates this trigger.

 

2.

Let's say there are two F232 triggers placed in the different points of the level:

 

- The first F232 forces Value 1 into a Byte variable.

- The second F232 forces Value 2 into a Byte variable.

 

Lara will activate only one F232 of them.

After that, Lara activates this TriggerGroup: a C43 studies if Byte is 1. If it is, then an A48 will put AddEffect1 on object ID12. Or else another C43 studies if Byte is 2. If it is then another A48 will put AddEffect1 on object ID28.

(By the way, if I try the same situation for A53 trigger instead of A48, then maybe you ask: 'So A53 is able to work in multiobject mode. Then why we need >Force (Y) transparency level on (X) Moveable object (only in multiobject mode)< Executable combination?' - Well, there must be tiny differences between the methods. See eg. the mathematical operations below which we cannot use for A53.)