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 18-05-15, 12:10   #1
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,493
Default TRNG – Some miscellaneous customization with variables for Moveable object slots

Instructions:

1. Copy the setup in your Script.
2. Build the Script.

Special instructions, if the Script doesn’t work/cannot be built:

1. Check TriggerGroup, and GlobalTrigger ID’s and change them if you are already using the ID in another TriggerGroup/GlobalTrigger.
2. If you already have a Parameters= PARAM_BIG_NUMBERS command at your level, then remove the same command of the setup you’ve just copied, and type the amount value of the removed command into the old command.
3. Open the Find Trigger Number window in Set Trigger Type panel, and copy-paste the underlined triggers there (one by one), to check them:

- If you changed TriggerGroup/GlobalTrigger ID’s, then you also need to change the TriggerGroup/GlobalTrigger ID in the trigger (if it is a trigger about a TriggerGroup/GlobalTrigger).
- If you removed the new Parameters= PARAM_BIG_NUMBERS command, you need to check if the big number index is still okay in the trigger (if it is a trigger about big numbers). If it is not, then choose the good one.
- Maybe you need to choose another variable, because you can’t use the variables (Global Short Alfa1) I used in the setups. So choose another one now (if it is a trigger about variables), if it is needed.
You are never allowed to change Current Value variable!

Export the trigger you have changed, replacing the previous trigger in the Script.
3. Build the Script.

Command:
Change MIP version of X Moveable object slot in Y distance

So, for example, if you have a BADDY_1 and a BADDY_1_MIP then you can select the value when they will be swapped for each other, if BADDY_1 is farther from to Lara than this distance, and when they will be swapped back if BADDY_1_MIP is closer to Lara than this distance.

TriggerGroup= 1, $2000, 292, $Z, > ; defining the object slot with its X ID code you see in NG Center/References (Z is the hexadecimal version of X)
$2000, 263, $W010, > ; put the number at W0 position of PARAM_BIG_NUMBERS into Global Short Alfa1 (GSA1) variable (W0 is 0 in this example, W0 must be typed in hexadecimal format now in the trigger code)
$2000, 294, $810 ; force GSA1 into the required distance
Parameters= PARAM_BIG_NUMBERS, Y

256 in Y means 1 square distance now.

Activate an F118 in „single” mode for TriggerGroup#1 to adjust the required distance.

Notes:

- Probably all the enemy objects with a MIP slot have a default distance for the swap. And that default distance is usually large.
- This command is useful first of all in the case of enemy MIP's. I mean, you can define preset values for this action in the case of Animating objects (see AnimatingMIP Script command), instead of using this TriggerGroup. But feel free to use this TriggerGroup with Animatings, if you want.
- It is a nice tool if you want to use a trick with two totally different objects: 'if Lara is closer to the object then the object will look as Object A, but if Lara is farther from the object then the object will look as Object B'. (It also works with F341 trigger, but in that case the mesh tree of the two objects must be similar.)

Condition:
If the MIP version of X Moveable object slot changes in Y equal/less/more than V distance

This condition is useful if you changed the distance with the previous command.

TriggerGroup= 1, $2000, 292, $Z, > ; defining the object slot with its X ID code you see in NG Center/References (Z is the hexadecimal version of X)
$2000, 293, $810, > ; put the distance into Global Short Alfa1 (GSA1) variable
$8000, 16, $W0Y ; if GSA1 is the number at W0 position of PARAM_BIG_NUMBERS, W0 (must be typed in hexadecimal format now in the trigger code) is 0 in this example
Parameters= PARAM_BIG_NUMBERS, V

Y values are:
26 – for a “bigger” condition (this time X must be the original X plus 1, so eg. if you want a “bigger than 512” condition, then X is 513)
27 – for a “smaller” condition
28 – for an “equal” condition (It is almost impossible to make this condition true, so it is not recommended!)

The easiest solutions to use the conditions:
- The TriggerGroup (1) ID is referred by a C15 trigger. There is a TRIGGER placed in the map, overlapped with the CONDITION trigger. The TRIGGER will be executed if Lara is in the trigger zone when the CONDITION is true.
- The TriggerGroup (1) ID is referred by the IdConditionTriggerGroup field of a GlobalTrigger.

Command:
Make X Moveable object slot have Y maximal sized shadow

TriggerGroup= 1, $2000, 292, $Z, > ; defining the object slot with its X ID code you see in NG Center/References (Z is the hexadecimal version of X)
$2000, 263, $W010, > ; put the number at W0 position of PARAM_BIG_NUMBERS into Global Short Alfa1 (GSA1) variable (W0 is 0 in this example, W0 must be typed in hexadecimal format now in the trigger code)
$2000, 294, $C10 ; force GSA1 into shadow size
Parameters= PARAM_BIG_NUMBERS, Y

Possibly if Y=1024, that means 1 square sized shadow radius.

Activate an F118 in „single” mode for TriggerGroup#1 to change the size.

Notes:

- 'Maximum size' means the size of the shadow is changing when the object is moving. In the case of Lara the default shadow size is 160. Probably that 160 units wide (i.e. maximum sized) shadow will be realized for example when she is standing and still with her Animation103.
- Collision boxes are usually related to the shadow size. So using this command means you force a shadow on the object, which shadow size is not related to the collision box size.

Condition:
If the maximal shadow size of X Moveable object slot is Y equal/less/more than V

This condition is useful if you changed the shadow size with the previous command.

TriggerGroup= 1, $2000, 292, $Z, > ; defining the object slot with its X ID code you see in NG Center/References (Z is the hexadecimal version of X)
$2000, 293, $C10, > ; put the size into Global Short Alfa1 (GSA1) variable
$8000, 16, $W0Y ; if GSA1 is the number at W0 position of PARAM_BIG_NUMBERS, W0 (must be typed in hexadecimal format now in the trigger code) is 0 in this example
Parameters= PARAM_BIG_NUMBERS, V

Y values are:
26 – for a “bigger” condition (this time X must be the original X plus 1, so eg. if you want a “bigger than 512” condition, then X is 513)
27 – for a “smaller” condition
28 – for an “equal” condition (It is almost impossible to make this condition true, so it is not recommended!)

Command:
Make the enemy of X Moveable object slot detect Lara in Y distance

The default value is Y=50. It possibly means „50 units in front of Lara's vertical axis”. So, for example, if you force Y=1024 at BADDY_1 slot, then BADDY_1 will wield his sword to hit the air in 1 square distance from Lara, without hurting her. (But I don't think this command is useful if the enemy attacks with bullets.)
This command is useful eg. in the case of AI_GUARD objects. I don't know the exact meaning of Y values now, but I know if Y is bigger, then the enemy will detect Lara only if she is closer to him.

TriggerGroup= 1, $2000, 292, $Z, > ; defining the object slot with its X ID code you see in NG Center/References (Z is the hexadecimal version of X)
$2000, 263, $W010, > ; put the number at W0 position of PARAM_BIG_NUMBERS into Global Short Alfa1 (GSA1) variable (W0 is 0 in this example, W0 must be typed in hexadecimal format now in the trigger code)
$2000, 294, $A10 ; force GSA1 into the distance
Parameters= PARAM_BIG_NUMBERS, Y

Activate an F118 in „single” mode for TriggerGroup#1 to change the distance.

Condition:
If the enemy of X Moveable object slot detects Lara in Y equal/less/more than V distance

This condition is useful if you changed the distance with the previous command.

TriggerGroup= 1, $2000, 292, $Z, > ; defining the object slot with its X ID code you see in NG Center/References (Z is the hexadecimal version of X)
$2000, 293, $A10, > ; put the distance into Global Short Alfa1 (GSA1) variable
$8000, 16, $W0Y ; if GSA1 is the number at W0 position of PARAM_BIG_NUMBERS, W0 (must be typed in hexadecimal format now in the trigger code) is 0 in this example
Parameters= PARAM_BIG_NUMBERS, V

Y values are:
26 – for a “bigger” condition (this time X must be the original X plus 1, so eg. if you want a “bigger than 512” condition, then X is 513)
27 – for a “smaller” condition
28 – for an “equal” condition (It is almost impossible to make this condition true, so it is not recommended!)

Made using TRNG 1.2.2.7.
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:43.


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