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 20-02-15, 09:54   #1
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default TRNG Some features about Lara hanging

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 Byte Alfa1, 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.

Don't forget: PARAM_BIG_NUMBERS position ID in the triggers, after the $ sign, must be typed in hexadecimal format!

Command:
X enable/disable to make all the walls Y climbable/non-climbable

It is a useful command eg. if you need a flipped room where all the walls are climbable, but you don’t want to create a flipped room there. – Disable the feature if Lara leaves the room, to restore the original situation.

TriggerGroup= 1, $2000, 246, $X09 ; set enabled or disabled status of ladders

X values are:
0-disabled
1-enabled

Activate an F118 in “continuous” mode for TriggerGroup#1 to enable the climbable walls. – Activate an F192 for the same TriggerGroup to disable them.
Or activate TriggerGroup#1 with a GlobalTrigger, with a continuous condition (eg. GT_ALWAYS) to enable the climbable walls. – If the condition goes false or you disable the GlobalTrigger with an F109 that will disable them.

Known bug:
Standing on ladders like that, Lara perhaps cannot climb around corners.

Note:
See ENV_CLIMB Script constants if you want a condition about ladders.

Condition:
If Lara X is/is not on a rope

This setup works only with a byte variable!

TriggerGroup= 1, $2000, 244, $1800, > ;put Lara’s rope status into Global Byte Alfa1 (GBA1) variable
$8000, 0, $5X ; if GBA1>= or < 5

X values are:
2A – she is just on a rope
29 – she is just not on a rope

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.

Condition:
If Lara is swinging X forwards/backwards on the rope when swinging in Y way, leaning in Z way

This setup doesn’t work:
- with other animations than 387 or 394, or
- with a byte variable.

X swinging forwards:

TriggerGroup= 1, Y, >
$2000, 271, $10, > ;copy GSA1 into Current Value
$2000, 244, $1710, > ; put Lara’s horizontal position on ropes into Global Short Alfa1 (GSA1) variable
$8000, 16, $3A, > ; if Current Value is less than GSA1
Z

X swinging backwards:

TriggerGroup= 1, Y, >
$2000, 271, $10, > ;copy GSA1 into Current Value
$2000, 244, $1710, > ; put Lara’s horizontal position on ropes into Global Short Alfa1 (GSA1) variable
$8000, 16, $38, > ; if Current Value >= GSA1
$8000+TGROUP_NOT, 16, $39, > ; if Current Value is less than GSA1
Z

Notes:
- The condition will be even true, looking a bit chaotic, in the moments when Lara gets the rope and starts swinging, shivering on the almost idle rope. If you want to rule that out, then also use the distance condition (see below), so the present condition won’t be true if Lara is too close to the vertical.
- Use animation conditions (C30, Animation373 or 374) if you want to study if Lara is on the idle rope.

Y values are:

- swinging (idly or hitting Key Dash): $8000, 387, $1E, $8000+TGROUP_OR, 394, $1E
- swinging idly: $8000, 5, $D, $8000, 387, $1E, $8000+TGROUP_OR, 394, $1E
- swinging, hitting Key Dash: $8000, 5, $10D, $8000, 387, $1E, $8000+TGROUP_OR, 394, $1E

Z values are:

- don’t use Z if you don’t want to study if Lara is leaning backwards/forwards
- leaning backwards (i.e. Lara is in front of the vertical): $8000, 16, $129 (if GSA1>=1)
- not leaning (i.e. the rope is exactly vertical): $8000, 16, $2B (if GSA1=0)
- leaning forwards (i.e. Lara is behind the vertical): $8000, 16, $2A (if GSA1<0)

Condition:
If Lara horizontal distance on the actual rope is X equal/bigger/smaller than Y, from the vertical, swinging in Z way

“Vertical”: the position of the rope when being idle.

TriggerGroup= 1, Z, >
$2000, 244, $1710, > ; put Lara’s horizontal position on ropes into Global Short Alfa1 (GSA1) variable
$8000, 2, $F, > ;if TriggerGroup#2 is true
$8000+TGROUP_OR, 3, $F ; if TriggerGroup#3 is true
TriggerGroup= 2, $8000, 16, $29, > ; if GSA1>=0
$8000, 16, $W0X ;if GSA1 is the number at Z0 position of PARAM_BIG_NUMBERS, W0 is 0 in this example
TriggerGroup= 3, $8000, 16, $2A, > ;if GSA1<0
$2000, 284, $10, > ; turn the sign in GSA1
$8000, 16, $W0X ;if GSA1 is the number at Z0 position of PARAM_BIG_NUMBERS, W0 is 0 in this example
Parameters= PARAM_BIG_NUMBERS, Y

The condition won’t study if Lara is just in front of or behind the vertical. If you want to study only one of them, then remove TriggerGroup2, with $8000, 2, $F and with TGROUP_OR flag (if you want to study only the “behind the vertical” part), or remove TriggerGroup3, with $8000+TGROUP_OR, 3, $F (if you want to study only the “in front of the vertical” part).

X values are:
26 – for a “bigger” condition (this time Y must be the original V0 plus 1, so eg. if you want a “bigger than 200” condition, then Y is 201)
27 – for a “smaller” condition
28 – for an “equal” condition

I don’t really recommend “equal” conditions, because they are usually never true, they are “too exact”. Use bigger+smaller conditions instead. For example: if you want to study 6000 distance, then you should study an interval instead, eg. 5900-6100.
So remove $8000, 16, $W028 (6000 in W0 position), and use this:
$8000, 16, $W026, > (5900 in W0 position)
$8000, 16, $W127 (6101 in W1 position)

The maximum of Y is about 11000. Sometimes (with some trick for a longer swing) it could be even about 13000. Probably 4096 means 1 square distance.

Z values are:

- hanging idly: $8000, 373, $1E, $8000+TGROUP_OR, 374, $1E
- swinging (idly or hitting Key Dash): $8000, 387, $1E, $8000+TGROUP_OR, 394, $1E
- swinging idly: $8000, 5, $D, $8000, 387, $1E, $8000+TGROUP_OR, 394, $1E
- swinging, hitting Key Dash: $8000, 5, $10D, $8000, 387, $1E, $8000+TGROUP_OR, 394, $1E
- hanging idly or swinging (idly or hitting Key Dash): $8000, 373, $1E, $8000+TGROUP_OR, 374, $1E, $8000+TGROUP_OR, 387, $1E, $8000+TGROUP_OR, 394, $1E

Made using TRNG 1.2.2.7.

Last edited by AkyV; 08-07-16 at 10:35.
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 03:24.


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