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 06-05-15, 12:07   #1
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,377
Default TRNG - Object position special

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 Long Alfa) 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!

Condition:
If X Moveable object is in Y room

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 256, $9FF, > ; put the actual tomb room index into Current Value variable
$2000, 298, $0, > ; convert the tomb room index into NGLE room index in Current Value
$8000, 255, $W028 ;if Current Value is the number at W0 position of PARAM_BIG_NUMBERS, W0 is 0 in this example
Parameters= PARAM_BIG_NUMBERS, Y

Y is the room ID you see in Room Editor. (Eg. if it is Room25 then Y is 25.)

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.

Notes:
- It also works for Lara, but there is a simpler solution for her: see ENV_ROOM_IS type MultEnvCondition.
- You cannot transport non-AI Moveable objects out of their rooms. But it doesn't mean they won't leave their rooms. Just think about a zipline that will slide from one room to another. (Or the motorbike etc.) And yes, in their cases the index of the room will be updated when they change rooms.

Condition:
If X Moveable object has just come through a door

“Door” this time means not the object but the connection between the rooms.

Known bug:
It won't work properly until the object comes through doors between rooms at least once or twice. (Don't misunderstand: it doesn't matter how many doors the object will cross or which ones those doors are. Which matters is the number of crosses so far, but through any doors.) - But each cross matters to prevent the bug only if the ambience color is different on the two sides of the door!
So use the condition only if you are sure that the object has crossed at least two doors during its lifetime so far, with different ambience colors on each side of the doors.

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 256, $2600, > ; put the “coming through” status into Global Byte Alfa1 (GBA1) variable
$8000, 0, $72B ;if GBA1 is 7

Note:
You can use this condition and the previous one, together: “If X Moveable object has just come through a door, into Y room”.

Command:
Turn X Moveable object immediately (around vertical axis) to face Y direction of the compass in Z way

Important!
The 'face' of the object is the side of the object which will always see the east if you have just placed the object in the Room Editor. (It is north in the game.)
So be careful! It is not always 'the real face' of the object (i.e. the side that looks like a face.)

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 261, $W01D ; put the number at W0 position of PARAM_BIG_NUMBERS (W0 is 0 in this example) into the actual direction
Parameters= PARAM_BIG_NUMBERS, Y

Y values are from -32768 to 32767.
The meaning of the main directions (according to the game, not the Room Editor):

0: north
8192: northeast
16384: east
24576: southeast
(32767: almost south, but a bit south-southeast)
-32768: south
-24576: southwest
-16384: west
-8192: northwest

Z values are:

- Z=single activation - the AI of the object or (in the case of Lara) the player by the keys are able to correct the forced direction at once.
Activate an F118 in “single” mode for TriggerGroup#1 for a single activation.

- Z=continous activation - the object (including Lara) is not able to turn to another direction. When stopping the activation: the AI of the object or (in the case of Lara) the player by the keys are able to correct the forced direction at once.
Activate an F118 in “continuous” mode for TriggerGroup#1 to force the unchangeable direction. – Activate an F192 for the same TriggerGroup to make it changeable.
Or activate TriggerGroup#1 with a GlobalTrigger, with a continuous condition (eg. GT_ALWAYS) to force the unchangeable direction. – If the condition goes false or you disable the GlobalTrigger with an F109 that will make it changeable.

Notes:

- This is a useful command for every Moveable object. I mean, there are some other methods to turn the objects:

= ACTION triggers or Parameters= PARAM_ROTATE_ITEM Script commands to turn the item suddenly or continuously by a given degrees.
= ACTION triggers to turn the item continuously to face a given main direction.

But - except this command - we don't have methods to turn the object suddenly to face a given (either main or not main) direction.
- In the case of Lara the continuous force is not the same as when you disable left/right arrow keys so she can't turn. First, the keys are enabled now, so Lara will try to turn if the player hit them - but she can't. Secondly, the keys are enabled now, so the player can use them for other purposes, eg. rolling the inventory.

Condition:
If X Moveable object faces Y direction of the compass

See Y values above.

If Y is positive or 0, so if the object faces exactly north or any direction of the “eastern half” of the compass (according to the game, not the Room Editor):

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 256, $1D30, > ; put the actual facing into Global Long Alfa (GLA) variable
$8000, 48, $W026, > ;if GLA 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
$8000, 48, $W127 ;if GLA is the number at W1 position of PARAM_BIG_NUMBERS, W1 (must be typed in hexadecimal format now in the trigger code) is 1 in this example
Parameters= PARAM_BIG_NUMBERS, Y1, Y2

I don’t use “equal” conditions, because they are usually never true, they are “too exact”. Use bigger+smaller conditions instead. For example: if you want to study the “exact northeast” (Y=8192) facing, then you should study an interval instead, eg. 8162-8222:
$8000, 48, $W026, > (Y1 is 8162 in W0 position)
$8000, 48, $W127 (Y2 is 8222 in W1 position)

If Y is negative, so if the object faces exactly south or any direction of the “western half” of the compass (according to the game, not the Room Editor):

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 256, $1D30, > ; put the actual facing into Global Long Alfa (GLA) variable
$2000, 284, $30, > ; turn the sign in GLA
$8000, 48, $W026, > ;if GLA 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
$8000, 48, $W127 ;if GLA is the number at W1 position of PARAM_BIG_NUMBERS, W1 (must be typed in hexadecimal format now in the trigger code) is 1 in this example
Parameters= PARAM_BIG_NUMBERS, Y1, Y2

If Y is negative, then turn the sign in PARAM_BIG_NUMBERS! (So eg. if Y=-8192, then type 8192 in PARAM_BIG_NUMBERS.) – It is important, because PARAM_BIG_NUMBERS doesn’t like conditions with negative numbers.

Note:
If you want to use this condition for a real-time compass, then see this tutorial:

http://www.tombraiderforums.com/showthread.php?t=211701&highlight=compass

Command:
Turn X Moveable object immediately (around horizontal axis) to Y left/right

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 261, $W01E ; put the number at W0 position of PARAM_BIG_NUMBERS (W0 is 0 in this example) into the actual direction
Parameters= PARAM_BIG_NUMBERS, Y

Y values are from -32768 to 32767.
The meaning of the main directions:

0: exactly upside (default)
8192: (45 degrees)
16384: exactly right (90 degrees)
24576: (135 degrees)
(32767: almost upside down)
-32768: exactly upside down (180 degrees)
-24576: (-135 degrees)
-16384: exactly left (-90 degrees)
-8192: (-45 degrees)

You need a continous activation. So the object (including Lara) is not able to turn to another direction. When stopping the activation, then the game will correct the position automatically to the default one.
Activate an F118 in “continuous” mode for TriggerGroup#1 to force the direction. – Activate an F192 for the same TriggerGroup to start the correction to the default one.
Or activate TriggerGroup#1 with a GlobalTrigger, with a continuous condition (eg. GT_ALWAYS) to force the direction. – If the condition goes false or you disable the GlobalTrigger with an F109 that will start the correction to the default one.

Known bugs:
- If Lara is rotated then maybe some of her animations - for example: doing interactions with objects - are impossible to do.
- Hair object of Lara may be buggy a bit with this kind of rotation.

Note:
This is a useful command for every Moveable object. I mean, there are some other methods to turn the objects:

- ACTION triggers or Parameters= PARAM_ROTATE_ITEM Script commands to turn the item suddenly or continuously by a given degrees.
- ACTION triggers to turn the item continuously to face a given main direction.

But - except this command - we don't have methods to turn the object suddenly to have a given (either main or not main) direction.

Command:
Turn Lara under water to Y direction

If you use the previous command Lara being under water, then the result will be different, which means the meaning of Y values are – supposing that the relative vertical axis is just horizontal:

0: exactly upside (default) – i.e. faces exactly below
8192: (45 degrees)
16384: exactly right (90 degrees) – i.e. faces exactly the left
24576: (135 degrees)
(32767: almost upside down)
-32768: exactly upside down (180 degrees) – i.e. faces exactly above
-24576: (-135 degrees)
-16384: exactly left (-90 degrees) – i.e. faces exactly the right
-8192: (-45 degrees)

“The relative vertical axis is just horizontal” means the position of the relative vertical axis is not constant, so it always goes from her feet to her head, even if she's just leaning backwards/forwards etc. The command will turn Lara around her relative vertical axis.

Condition:
If X Moveable object is turned left/right around the horizontal axis to Y degree

See Y values above.

If Y is positive or 0, so if the object is turned exactly upside or to any direction in the right 180 degrees, i.e. in the “right half”:

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 256, $1E30, > ; put the actual facing into Global Long Alfa (GLA) variable
$8000, 48, $W026, > ;if GLA 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
$8000, 48, $W127 ;if GLA is the number at W1 position of PARAM_BIG_NUMBERS, W1 (must be typed in hexadecimal format now in the trigger code) is 1 in this example
Parameters= PARAM_BIG_NUMBERS, Y1, Y2

I don’t use “equal” conditions, because they are usually never true, they are “too exact”. Use bigger+smaller conditions instead. For example: if you want to study the “exact 45 degrees” (Y=8192) facing, then you should study an interval instead, eg. 8162-8222:
$8000, 48, $W026, > (Y1 is 8162 in W0 position)
$8000, 48, $W127 (Y2 is 8222 in W1 position)

If Y is negative, so if the object is turned exactly upside down or to any direction in the left 180 degrees, i.e. in the “left half”:

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 256, $1E30, > ; put the actual facing into Global Long Alfa (GLA) variable
$2000, 284, $30, > ; turn the sign in GLA
$8000, 48, $W026, > ;if GLA 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
$8000, 48, $W127 ;if GLA is the number at W1 position of PARAM_BIG_NUMBERS, W1 (must be typed in hexadecimal format now in the trigger code) is 1 in this example
Parameters= PARAM_BIG_NUMBERS, Y1, Y2

If Y is negative, then turn the sign in PARAM_BIG_NUMBERS! (So eg. if Y=-8192, then type 8192 in PARAM_BIG_NUMBERS.) – It is important, because PARAM_BIG_NUMBERS doesn’t like conditions with negative numbers.

Condition:
If Lara is turned to Y direction under water

Use the previous condition. But, as I said above, Y has a different meaning now.

Command:
Turn X Moveable object immediately (around horizontal axis) to Y forwards/backwards

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 261, $W01C ; put the number at W0 position of PARAM_BIG_NUMBERS (W0 is 0 in this example) into the actual direction
Parameters= PARAM_BIG_NUMBERS, Y

Y values are from -32768 to 32767.
The meaning of the main directions:

0: exactly upside (default)
8192: (45 degrees)
16384: exactly backwards (90 degrees) - i.e. faces exactly the ceiling
24576: (135 degrees)
(32767: almost upside down)
-32768: exactly upside down (180 degrees)
-24576: (-135 degrees)
-16384: exactly forwards (-90 degrees) - i.e. faces exactly the floor
-8192: (-45 degrees)

Usually activate an F118 in “single” mode for TriggerGroup#1 to turn.
But if it is Lara, then you need a continous activation. When stopping the activation, then some 'serious state changes' - for example, jumping with Lara into deep water - may annul the effect of the rotation after that.
Activate an F118 in “continuous” mode for the continuous activation of TriggerGroup#1. – Activate an F192 for the same TriggerGroup to stop the activation.
Or activate TriggerGroup#1 with a GlobalTrigger, with a continuous condition (eg. GT_ALWAYS), for the continuous activation. – If the condition goes false or you disable the GlobalTrigger with an F109 that will stop the activation.

Note:
This is a useful command for every Moveable object. I mean, there are some other methods to turn the objects:

- ACTION triggers or Parameters= PARAM_ROTATE_ITEM Script commands to turn the item suddenly or continuously by a given degrees.
- ACTION triggers to turn the item continuously to face a given main direction.

But - except this command - we don't have methods to turn the object suddenly to have a given (either main or not main) direction.

Condition:
If X Moveable object is turned forwards/backwards around the horizontal axis to Y degree

See Y values above.

If Y is positive or 0, so if the object is turned exactly upside or to any direction in the back 180 degrees, i.e. in the “back half”:

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 256, $1C30, > ; put the actual facing into Global Long Alfa (GLA) variable
$8000, 48, $W026, > ;if GLA 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
$8000, 48, $W127 ;if GLA is the number at W1 position of PARAM_BIG_NUMBERS, W1 (must be typed in hexadecimal format now in the trigger code) is 1 in this example
Parameters= PARAM_BIG_NUMBERS, Y1, Y2

I don’t use “equal” conditions, because they are usually never true, they are “too exact”. Use bigger+smaller conditions instead. For example: if you want to study the “exact 45 degrees” (Y=8192) facing, then you should study an interval instead, eg. 8162-8222:
$8000, 48, $W026, > (Y1 is 8162 in W0 position)
$8000, 48, $W127 (Y2 is 8222 in W1 position)

If Y is negative, so if the object is turned exactly upside down or to any direction in the front 180 degrees, i.e. in the “front half”:

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 256, $1C30, > ; put the actual facing into Global Long Alfa (GLA) variable
$2000, 284, $30, > ; turn the sign in GLA
$8000, 48, $W026, > ;if GLA 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
$8000, 48, $W127 ;if GLA is the number at W1 position of PARAM_BIG_NUMBERS, W1 (must be typed in hexadecimal format now in the trigger code) is 1 in this example
Parameters= PARAM_BIG_NUMBERS, Y1, Y2

If Y is negative, then turn the sign in PARAM_BIG_NUMBERS! (So eg. if Y=-8192, then type 8192 in PARAM_BIG_NUMBERS.) – It is important, because PARAM_BIG_NUMBERS doesn’t like conditions with negative numbers.

Condition:
If the floor below X Moveable object is Y less/more/exactly than Z clicks from Floor Level 0

The usage is recommended only with creatures if they are just alive.

If Z is positive or 0, so if the object is exactly on Floor Level 0 or below it:

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 256, $30, > ; put the actual level into Global Long Alfa (GLA) variable
$8000, 48, $W0Y ;if GLA is the number at W0 position of PARAM_BIG_NUMBERS, W0 is 0 in this example
Parameters= PARAM_BIG_NUMBERS, Z

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

256 in Z means 1 click distance. The deepest useful floor is Floor Level -127=-127 clicks=127x256=32 512, so Z max is 32 512.

If Z is negative, so if the object is above Floor Level 0:

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 256, $30, > ; put the actual level into Global Long Alfa (GLA) variable
$2000, 284, $30, > ; turn the sign in GLA
$8000, 48, $W0Y ;if GLA is the number at W0 position of PARAM_BIG_NUMBERS, W0 is 0 in this example
Parameters= PARAM_BIG_NUMBERS, Z

256 in Z means 1 click distance. The highest useful floor is Floor Level 128=128 clicks=128x256=32 768, so Z max is 32 768.

If Z is negative, then turn the sign in PARAM_BIG_NUMBERS! (So eg. if Z=-1024, then type 1024 in PARAM_BIG_NUMBERS.) – It is important, because PARAM_BIG_NUMBERS doesn’t like conditions with negative numbers.

Two examples to understand why this condition could be a great help for level-editing:

- Lara is in a room with a very uneven floor. You want her to activate a thing only if the floor below her is on a given level. It means one trigger on each square that has on that level, using 'fragmented' conditions for each trigger. (The conditions are needed because not each part of a broken surface has on the same level.) Or, instead of that, you create a GlobalTrigger, with this 'if the floor below.' condition for Lara. The Z in that condition is the required floor level. (The GlobalTrigger is naturally enabled only if Lara is in that room.)
(Use one more condition in the GlobalTrigger: C25, in 'touching floor' mode. It causes 'if the floor below her is on a given level' turns into 'if she's on the given floor level'.)

- You want a trigger for Lara and a HEAVY trigger on the same square. It isn't possible, of course, so you place a trigger for Lara there and - instead of placing that HEAVY - create a GlobalTrigger, with an 'if the floor below.' condition, for the required creature. The Z in that condition is the floor level value of that square.

Command:
Move X Moveable object to A “X” horizontal position (inside the actual room)

- Usually Moveable objects can be transported ONLY inside the room where they are placed in Room Editor.
- Lara or objects with AI can be transported ONLY inside the room where they just are in the moment when you transport them. (You can move Lara even between rooms, if the vector of the move from the start to the target cannot cross walls or floors, only portals between rooms. - See another method for that, below.)

“X” horizontal position is always calculated from the northern - 'upper' - edge of Room Editor Window, in southern direction.

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 261, $W019 ; put the number at W0 position of PARAM_BIG_NUMBERS (W0 is 0 in this example) into the actual position
Parameters= PARAM_BIG_NUMBERS, A

A is maximum 103 424.

The northest square line of the editor window is useless for the inside part of the rooms. One square is 1024 units, so one square line has 1024 units width. It means if you move your room in the editor window as northern as you can, then you will always see a little (1024 units wide) gap, the northern wall of the room will never reach the northern edge of the window.
That's why eg. if you place your room in the northest position, and you want to force an 'in 3 squares distance from that wall' horizontal position on the object, then the proper solution is 1024+3x1024=4096 units, not 0+3x1024=3072 units.
The biggest distance from wall to wall inside the rooms is 100 squares=102 400 units.
That's why I said that 102 400+1024=103 424. (If a part of the room sticks out of the editor window – it could happen in some cases – then naturally the value could be a bit more than 103 424.)

Activate an F118 in “single” mode for TriggerGroup#1 to move the object.

How can I get the required coordinates?
Type a Diagnostics Script command and a DiagnosticType Script command with DGX_COMMON_VARIABLES constant, so the messages about the numeric variable actual values will be typed on the screen.

And you also need a GT_ALWAYS GlobalTrigger in the Script, that will activate a TriggerGroup:

GlobalTrigger= 2, IGNORE, GT_ALWAYS, IGNORE, IGNORE, 2, IGNORE
TriggerGroup= 2, $5000, X, $36, > ; defining Lara (even if it is not Lara that you want to move in the game!) with its X ID code you see in Room Editor
$2000, 256, $19FF ; put the actual coordinate into Current Value variable

Build the Script, and start the game. See the Diagnostics message on the screen, at Current Value variable. Move Lara to the required position, use even flycheat if it is needed. The value (i.e. the coordinate) will be updated continuously when you move Lara.
If Lara is in the required position, then read the Current Value in the messages, and type the value in Parameters= PARAM_BIG_NUMBERS as Value A.
And now you can remove GlobalTrigger#2 and TriggerGroup#2 from the Script.

What can I do if the coordinate is too big? (Because the biggest number in PARAM_BIG_NUMBERS is 65535.)
Then you need to change the command this way:

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 263, $W030, > ; put the number at W0 position of PARAM_BIG_NUMBERS (W0 is 0 in this example) into Global Long Alfa (GLA) variable
$2000, 251, $230, > ; multiply GLA by 2
$2000, 257, $1930 ; put GLA value into the actual position
Parameters= PARAM_BIG_NUMBERS, B

B is the half of A. So eg. if you want to force Coordinate 80000, then B must be 40000.

Notes:

- If the animation has a SetPosition AnimCommand (see for example: LARA object Animation 97), changing a coordinate, then that coordinate won't be refreshed for this command while the animation is being performed.

- You may ask why we want to complicate this thing. I mean, a simple 'Move' ACTION trigger or a Parameters=PARAM_MOVE_ITEM Script command would be more simple to force the position, wouldn't it? - Well, those features move the object with a given distance, but this command moves the object into a given position. That is not always the same.
And one more thing: a 'usual' transportation with LARA_START_POS objects (see A40 trigger) always forces a new X, Y and Z coordinates on the object. But this commmand will be able to force only Position X and the transported thing will keep its actual Position Y and Z.

Known bug:
The camera won’t probably be refreshed just after the transportation. Just hit Look button to restore the proper view (or also type some camera trigger in TriggerGroup#1).

Command:
Move Lara to A “X” horizontal position (into Room C)

You can move Lara even into another room (even if the vector of the move from the start to the target crosses walls or floors), if you extend the formula of the previous command:

TriggerGroup= 1, $5000, X, $36, > ; defining Lara with its X ID code you see in Room Editor
$2000, 261, $W019, > ; put the number at W0 position of PARAM_BIG_NUMBERS (W0 is 0 in this example) into the actual position
$2000, 261, $W109 ; put the number at W1 position of PARAM_BIG_NUMBERS (W1 is 1 in this example) into the actual room
Parameters= PARAM_BIG_NUMBERS, A, C

Or if the coordinate is too big:

TriggerGroup= 1, $5000, X, $36, > ; defining Lara with its X ID code you see in Room Editor
$2000, 263, $W030, > ; put the number at W0 position of PARAM_BIG_NUMBERS (W0 is 0 in this example) into Global Long Alfa (GLA) variable
$2000, 251, $230, > ; multiply GLA by 2
$2000, 257, $1930, > ; put GLA value into the actual position
$2000, 261, $W109 ; put the number at W1 position of PARAM_BIG_NUMBERS (W1 is 1 in this example) into the actual room
Parameters= PARAM_BIG_NUMBERS, B, C

B is the half of A. So eg. if you want to force Coordinate 80000, then B must be 40000.
C must be the tomb index of the target room. Open the room list in Room Editor. In the brackets, you can see two numbers in the room names. The second number is what you need now.

Note:
If you can't decide about the room, then see the pivot of the object. For example, if Lara is standing in a 1 click deep pool, then she's in the room above the water surface. But, when she's standing in a 2 clicks deep (waist-deep) pool, then she's in the pool. - It's because when Lara is standing in a 1 click deep (knee-deep) pool, then her pivot (her butt) is above the water surface.

Condition:
If X Moveable object is in A “X” horizontal position

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 256, $1930, > ; put the actual coordinate into Global Long Alfa (GLA) variable
$8000, 48, $W026, > ;if GLA 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
$8000, 48, $W127 ;if GLA is the number at W1 position of PARAM_BIG_NUMBERS, W1 (must be typed in hexadecimal format now in the trigger code) is 1 in this example
Parameters= PARAM_BIG_NUMBERS, A1, A2

I don’t use “equal” conditions, because they are usually never true, they are “too exact”. Use bigger+smaller conditions instead. For example: if you want to study Coordinate 30000, then you should study an interval instead, eg. 29950-30050.
$8000, 48, $W026, > (A1 is 29950 in W0 position)
$8000, 48, $W127 (A2 is 30050 in W1 position)

What can I do if the coordinate is too big? (Because the biggest number in PARAM_BIG_NUMBERS is 65535.)
Then you need to change the command this way:

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 256, $1930, > ; put the actual coordinate into Global Long Alfa (GLA) variable
$8000, 48, $W226, > ; if GLA is >= the number at W2 position of PARAM_BIG_NUMBERS, W2 (must be typed in hexadecimal format now in the trigger code) is 2 in this example
$2000, 253, $230, > ; divide GLA by 2
$8000, 48, $W026, > ;if GLA 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
$8000, 48, $W127 ;if GLA is the number at W1 position of PARAM_BIG_NUMBERS, W1 (must be typed in hexadecimal format now in the trigger code) is 1 in this example
Parameters= PARAM_BIG_NUMBERS, A3, A4, E

A3 and A4 is the half of A1 and A2. So eg. if you want to study Coordinate 80100 for A2, then A4 must be 40050.
E is always 65535.

Note:
The original 'fragmented' conditions work only for Lara. You should see: you can also use the position conditions for other Moveables as 'HEAVY type fragmented conditions'. (Because eg. a condition like that is able to define a position such as 'in the middle of a square'.)

Condition:
If X Moveable object is Z exactly/deeper/higher than D “Y” vertical position

If D is positive or 0, so if the object is exactly on Floor Level 0 or below it:

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 256, $1A30, > ; put the actual coordinate into Global Long Alfa (GLA) variable
$8000, 48, $W0Z ;if GLA is the number at W0 position of PARAM_BIG_NUMBERS, W0 is 0 in this example
Parameters= PARAM_BIG_NUMBERS, D

Z values are:
26 – for a “bigger” (deeper) condition (this time D must be the original D plus 1, so eg. if you want a “bigger than 1024” condition, then D is 1025)
27 – for a “smaller” (higher) condition
28 – for an “equal” condition

256 in D means 1 click distance. D max is 32 512 now.

If D is negative, so if the object is above Floor Level 0:

TriggerGroup= 1, $5000, X, $36, > ; defining the object with its X ID code you see in Room Editor
$2000, 256, $1A30, > ; put the actual coordinate into Global Long Alfa (GLA) variable
$2000, 284, $30, > ; turn the sign in GLA
$8000, 48, $W0Z ;if GLA is the number at W0 position of PARAM_BIG_NUMBERS, W0 is 0 in this example
Parameters= PARAM_BIG_NUMBERS, D

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

256 in D means 1 click distance. D max is 32 768 now.

If D is negative, then turn the sign in PARAM_BIG_NUMBERS! (So eg. if D=-1024, then type 1024 in PARAM_BIG_NUMBERS.) – It is important, because PARAM_BIG_NUMBERS doesn’t like conditions with negative numbers.

Note:
You can’t use a command to force vertical positions like that.

Command:
Move X Moveable object to A “Z” horizontal position (inside the actual room)

“Z” horizontal position is always calculated from the western - 'left' - edge of Room Editor Window, in east direction.

See the command about X coordinate to understand how it works. – But this time:

- type $2000, 261, $W01B instead of $2000, 261, $W019,
- type $2000, 256, $1BFF instead of $2000, 256, $19FF,
- type $2000, 257, $1B30 instead of $2000, 257, $1930.

Command:
Move Lara to A “Z” horizontal position (into Room C)

See the command about X coordinate to understand how it works. – But this time:

- type $2000, 261, $W01B instead of $2000, 261, $W019,
- type $2000, 257, $1B30 instead of $2000, 257, $1930.

Condition:
If X Moveable object is in A “Z” horizontal position

See the condition about X coordinate to understand how it works. – But this time type $2000, 256, $1B30 instead of $2000, 256, $1930.

Made using TRNG 1.2.2.7.

Last edited by AkyV; 08-07-16 at 10:37.
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 04:36.


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