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 02-08-14, 11:10   #1
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,498
Default TRNG Comparing miscellaneous old (TRLE) and new (TRNG) setups to each other

The contents:

- sinks
- secrets
- flipmaps
- level jumps
- electric arcs
- vitality
- object invisibility/transparency
- shattering/explosion
- animation ranges
- room types (water, snow etc.)
- object position
- object size
- inventory contents

1. Sinks

The methods to activate a sink icon with a trigger, placing the trigger (TRIGGER or – for an activation with a harpoon gun – COMBAT) always on a pool floor square:

- The classic, TRLE method: SINK trigger.
- The new, TRNG method: an F118 trigger to activate a “multiple” TriggerGroup. The TriggerGroup must contain an A46 trigger.

So A46 will be useful only exported in Script!

You can choose any methods but SINK triggers cannot be exported into the Script/WADMerger. ACTION triggers can. (It is useful eg. if you want other triggers as well in that TriggerGroup.)

Note:
If you remove a Sink icon from the map then the classic TRLE triggers to activate/deactivate it will be deleted as well automatically.
But, if a TRNG ACTION trigger activates/deactivates a Sink then don’t forget to delete that trigger after you deleted that Sink, because this time the triggers won’t be deleted automatically.

The methods to deactivate a Sink icon (either with the classic or the new method):

- if at least one of the trigger conditions goes false (which mostly means if Lara leaves the trigger zone), or
- Lara is in the area above the trigger floor square, but out of water.

There is a special solution – if you use that F118 in “continuous” mode:

a, Usually sink triggers will draw Lara if she is floating/swimming on/in water, in the trigger zone. The sink of the continuous F118 will draw Lara if she is floating/swimming on/in water, anywhere in the level (so even not above the trigger square, or in another pool), after the activation of the trigger.
b, Usually sink triggers can be activated only by Lara, on/in water. This continuous F118 can be activated even in other ways:


- Lara in the zone of TRIGGER, above the water surface, or
- with PAD trigger - naturally always on dry land, or
- with COMBAT trigger - with any weapon, either in water with harpoon gun or on dry land with other weapons, or
- with HEAVY trigger, by anyone/anything else but Lara, either in water or on dry land.

If you activated the sink with a continuous F118 then these are the ways to deactivate it:

- activate another continuous F118 for another sink, or
- activate an F192 trigger (anywhere, so even in another pool or on dry land).


2. Secrets

The methods to place a secret trigger:

- The classic, TRLE method: SECRET trigger.
- The new, TRNG method: FLIPEFFECT trigger (F404).

The differences between the old and the new trigger:

- SECRET triggers cannot be exported into the Script/WADMerger. FLIPEFFECT triggers can.
- If you come back to a level where the SECRET trigger was activated before, then you can activate that SECRET again, even if the SECRET has a One Shot function. This problem doesn’t exist with an F404 having the “only once” status.
- The bug-free ID’s are between 0 and 7 in SECRET. (Maybe you can find some bigger ID’s, which are not buggy.)
That interval is much bigger with FLIPEFFECT (0-255).

“Buggy ID” means the triggers will work in multiple mode: a newer and a newer secret “will be found” again and again at each tick frame while the conditions are all true (so eg. while Lara is standing in a PAD SECRET trigger), adding 1 to “Secrets Found” in Statistics, and starting ID5 audio file again and again.
That won’t help if you use One Shot in the trigger.

Note:
The triggers for secrets are not allowed to be activated later again, if the activator (mostly Lara) comes back to activate them again. It is automatic for the bug-free SECRET triggers, but it works only for 0-15 ID’s of the FLIPEFFECT. So you need One Shot for the 16-255 ID’s of the FLIPEFFECT.

3. Activating or deactivating flipmaps

You can have maximum 32 flipmaps in a level (from ID 0 to ID 31).

The methods to activate a flipmap with triggers:

- The classic, TRLE method: FLIPMAP trigger.
- The new, TRNG method: FLIPEFFECT trigger (F125).

The methods to deactivate a flipmap with triggers:

- The classic, TRLE method: FLIPOFF trigger.
- The new, TRNG method: FLIPEFFECT trigger (F126).

You can choose any methods but there are differences between the classic and the new methods:

- FLIPMAP or FLIPOFF triggers cannot be exported into the Script/WADMerger. FLIPEFFECT triggers can. (That’s why eg. you can use a timer for the flipmap of the FLIPEFFECT, using that FLIPEFFECT in the Script, with an Organizer, to activate or deactivate the flipmap only after given seconds elapsed, after the start of the Organizer.)
- You can’t use One Shot button with FLIPOFF triggers, but you can with F126.
- If you switch off a switch then the TRIGGER FLIPMAP below the switch will work like a deactivating trigger. It is not possible with TRIGGER F125 triggers, each usage of the switch will take the F125 as an activating trigger.

Alternative versions to activate a flipmap:

a, Classic methods:

- A FLIPON trigger, instead of a FLIPMAP.
The difference is: a FLIPON could activate a flipmap only if it was activated at least once before.
- The SCALES+WATERSKIN setup (see the related tutorial on TRF) is able to activate only objects. If you want to activate a flipmap with a trigger for the setup then activate a FLAME_EMITTER2 object, which is not a flame this time: type a negative number in the OCB panel of the “flame” – and, when the object has been activated, then the flipmap with that (positive) ID has been activated.

b, New methods:

- Activate an F333, and the flipmap will switch on/off continuously, in a given rhythm. (Stop it with F334.)
- If you switch on/off number buttons in triggers then you can have a case when more than one trigger is needed to activate an object. And it also works with flipmaps.
Or you can use F124 for flipmaps, which is able to simulate pressed/released number buttons. (The difference is F124 can be exported into the Script/WADMerger. FLIPMAP is not.)

Notes for the number button method:

- You can even mix the FLIPMAP/F124 methods: eg. if you need a FLIPMAP and an F124 together to switch on a flipmap.
- “One Shot” trigger values in F124 are useless, they will do the same like the “One Shot-less” values.
- Be careful: if you use this setup to switch on a flipmap which was switched on before at least once, then each FLIPMAP/F124 trigger for that flipmap will activate the flipmap right away, without using one/more other FLIPMAP/F124. (Use One Shot button only this time, i.e. if you want to prevent that second, bad activation.)

4. Level jumps

The methods to make Lara jump to another level:

- The classic, TRLE method: FINISH trigger.
- The new, TRNG method: FLIPEFFECT trigger (F82).

The differences between the methods:

- FINISH triggers cannot be exported into the Script/WADMerger. FLIPEFFECT triggers can.
- FINISH triggers cannot use One Shot button pressed. FLIPEFFECT triggers can. (So don’t use “Perform one single time” with F82 – that is buggy.)
- F82 can be timed (see the trigger values) to load a level only after a given time. FINISH can’t.
- Using LARA_START_POS for an alternative level start position is possible only with FINISH triggers, FLIPEFFECT can’t do that.

Notes:

- Though the biggest level ID you can see in F82 is 127, according to my experiences the biggest useable ID is 43 either in FINISH or F82 – so you can have maximum 43 levels in a game.
- One Shot isn’t unnecessary for a level jump trigger, because what if Lara comes back to this level later, and you don’t want her to activate the trigger again, for a newer level jump.
- I recommend using F82 timed with the trigger values only in One Shot mode or else the result could be buggy, if the trigger will be activated more than once for the jump. Instead, if you want a level jump in a given time after the trigger activation, you should use an exported F82 in the Script, with an Organizer (using 0 timer in the trigger values).
- An alternative classic version to jump a level is if you use an F4 trigger, instead of FINISH.
The difference is an F4 will always load Lara to the level which is the next in the Script just after the present one.

The end of the game:

You need to use these special level ID’s in the FINISH/F82 triggers if you want to finish your game, at the end of the last level:

- If you have a “Customize= CUST_SET_CREDITS_LEVEL, A” Script command at the Title section of the Script, or at the last level of the game, then A=X+1. X is the level amount in your game.
If you activate a FINISH/F82 for Level A in that last level, then the game will load the title, starting the classic TRLR end credits, with 098.wav loop audio. If the credits end, the main menu will show up.

- B=X+2. X is the level amount in your game.
If you activate a FINISH/F82 for Level B in the last level, then the game will load the title and the main menu, with the loop audio you adjusted in the Script for the title.

Note:
See “End credits” tutorial on TRF if you want customized end credits.

5. Electric arcs

You can perform these types of electric arcs:

a, The Obelisk setup of The Great Hypostyle Hall TRLR level:
The OBELISK objects are able to emit (harmless) electric arcs – see the related tutorial on TRF.

b, The setup with PUSHABLE_OBJECTs of The Lost Library TRLR level:
There will be (harmless) electric arcs between the active PLANET_EFFECT objects – see the “Lightning and sparks” tutorial on TRF.

c, The LIGHTNING_CONDUCTOR is a nullmesh that creates electric arcs even in TRLE – that could be even a lightning that strikes in your game.
Usually it works this way: place the object somewhere in the map. Activate it, and an electric arc comes from the ceiling square just above the object. (Or, from the portal above the object, if there is no ceiling square there.) The arc goes to the object, then dissipates right away. After some moments another arc comes. Etc. (The pause between the arcs is irregular.) You can stop the arcs with deactivating the object.

- If 0 is typed in the OCB window then the arcs are harmless for Lara.
- If 1 is typed in the OCB window then the arcs are harmful for Lara.
- If 2 is typed in the OCB window – then you can use that LIGHTNING_CONDUCTOR in a special setup you could see in Street Bazaar TRLR level. (See the related tutorial on TRF.)

d, A FLAME_EMITTER3 nullmesh object usually performs bursts of flames – except if you type a number in its OCB window:

- Numbers being useful even in TRLE (all the arcs are harmless for Lara):

= shorter (OCB1) or longer (OCB2) horizontal arcs comes from the nullmesh.
= OCB3: the arcs from the nullmesh will want to hit ANIMATING3 objects. (The effect is slower with OCB4.)

- Numbers being useful only in TRNG:

= OCB888: the arc comes from the nullmesh, hits, kills and burns Lara right away.
= OCB889: the arc comes from the nullmesh, hits, hurts and follows Lara. When her life energy runs out, and she dies, then she will catch fire.
= OCB890: the harmless arc comes from the nullmesh, hits and follows Lara.

Start/stop the arcs with activating/deactivating the emitter.

See more about FLAME_EMITTER3 OCB values in NG Center/Reference.

e, Parameters= PARAM_LIGHTNING Script command is a complicated way to create an electric arc in TRNG. – But there is a big benefit: this arc can be customized in several ways.
This is how it works: you define an electric arc with a command like that, then an F359 trigger will start that arc, that strikes during a given time. (An F362 will stop the lightning if that is infinite.)

The most important properties of this kind of arcs:

- The start/end point of the arc is mostly a Moveable/Static object (including Lara) you define.
- Customization is possible for the arc itself (eg. you want less “arc threads” for the lightning).
- Additional features are possible. (An earthquake if the lightning hits, the lightning kills the target, Lara target is screaming when hitting her etc.)

f, LASER_HEAD TRNG creature shoots electric arcs from the eyes. (Harmful for Lara.)

Note:
The lightning of Lightning Script command is not an electric arc, but “only” a weather light effect on the sky.

6. Vitality

Enemy’s vitality


Usually Lara’s weapons will hurt/kill an enemy or perhaps she can run over them with a vehicle. And there can be special kills – see eg. the different wraith traps (eg. the water for fire wraiths) or when the five number button is on at the AI_FOLLOW, so it will remove the guide from the map etc.
But you can use even (old or new) triggers to kill (or hurt) an enemy:

Classic, TRLE triggers:

a, F31: this trigger will kill all the little beetles that are just living.
b, F46: this trigger will kill all the mortal enemies that are just living.

New, TRNG triggers:

a, F343 will kill the shoal of the emitted little fishes.
b, A13 (in “ghost trap” mode) all the living WRAITH3 creatures will start towards the given LARA_START_POS, and will die if they slam into the floor during the “travel”.
c, A14 will kill the enemy in some peculiar ways (you can try some of the ways to remove non-creature Moveables off the map):

- “Antitrigger” will petrify the enemy.*
- “Default”: you force the death and the usual dying animation with it.*
- “Disable emitter”: use it to make the emitter stop emitting creatures (eg locusts). (Activate the emitter object again to continue emitting.)
- “Exploding creature”: as if an explosive ammo blew the enemy up. - Enemies with hardcoded movements will work oddly now. Eg a wraith falls down as if it had been shot.)
- “Exploding moveable on ground/sky”: the enemy (even in water) will blow up with a “ground/sky explosion” effect.
- “Exploding moveable underwater”: the enemy (even on ground/sky) will blow up with an “underwater explosion” effect.
- “Hide” and “remove” – these methods seem the same technically: make the enemy disappear at once. (This is the way to remove the dead, burning Ahmet from the floor.) – It is only experimental with enemies with hardcoded movements.
- “Kill”: the enemy will be frozen suddenly, go transparent, then disappear.*

*: it works only for enemies with animations in WADMerger. So don’t use them with enemies with hardcoded movements.

d, Some effects of A82 are also able to kill enemies:

- Baboon Teleport (Untrigger moveable): it kills the enemy/removes the non-creature Moveable object from the map with a flash effect you could see when the game removes a baboon.
- Helicopter Explosion: it simulates the explosion of the mine to kill the enemy/remove the non-creature Moveable object from the map.

e, A38 will hurt the given enemy.

Notes:

- After some kills performed by A14, Lara is able to aim/shoot at – even the last, empty position of – the “dead” enemy.
- Don’t remove a non-creature Moveable object by A14/A82 if you don’t activate the object before that. (Even if that object doesn’t have animations, so theoretically you shouldn’t activate it.) Or else there may be bugs: eg. the object collision will remain there after the disappearance.
And, for the same reason, don’t activate that trigger-to-activate-the-object after the object has been removed. (It is not a constant problem, though.)

Customization for the enemy’s health in TRNG:


Enemy Script command is able to adjust the maximum vitality of a creature type.

Note:
If you make an immortal enemy mortal in Enemy command then don’t forget to use Customize= CUST_ADD_DEATH_ANIMATION Script command to define the dying animation.

Lara’s vitality:

The ways to affect Lara’s health in TRLE are if you use medipacks, if you put enemies, traps, flames or big falls on her path, or if she runs out of air in deep water.

TRNG let you use other methods as well to affect her health:

a, Activating these triggers:

- A14 "exploding creature": will blow Lara up.
- A14 "exploding moveable...": will kill Lara in the default way, with the exploding effect.
- A82 "helicopter explosion": will blow Lara up with the "exploding mine" effect.
- F63 will kill Lara in the required way. (A14 triggers also have a default death effect on Lara, in "default" or "kill" way.)
- F89 will decrease Lara’s health. F90 will increase that.
- F91 will make Lara invulnerable for a given time. (Abort the invulnerability with F93 if that is infinite.)
- F92 will extinguish the flames on Lara. (Only in some cases – see just below.)
- F104 will (not) let Lara have infinite air under water. (It is useful eg. if you want her to wear a diver outfit.)
- F110 will give Lara some extra air under water.
- F111 will decrease the damage when Lara is in a damage room.
- F112 will decrease the damage of the cold when Lara is in a cold water pool.
- F113 will poison Lara. F114 will remove the poisoning.

b, Touching the given Static object:

- Typing 32 in the OCB window of the Static object – Lara will be hurt.
- Typing 64 in the OCB window of the Static object – Lara will catch fire.
- Typing 128 in the OCB window of the Static object – Lara (and the Static) will explode. (It needs Lara’s “death by stepping on a mine” animation in the WAD.)
- Typing 256 in the OCB window of the Static object – Lara will be poisoned.
- F186 will remove the “hurt” feature of the Static, F185 will restore/add that.
- F188 will remove the “catch fire” feature of the Static, F187 will restore/add that.
- F182 will remove the “explode” feature of the Static, F181 will restore/add that.
- F184 will remove the “poison” feature of the Static, F183 will restore/add that.
- F354 (in some modes of Window Timer) will add/restore/remove “the Static will hurt/burn/explode/poison Lara” feature for all the objects of the given Static ItemGroup.

c, Miscellaneous:

- Lara runs out of air in deep quicksand.
- Lara is in a damage room or a cold water pool, for a too long time.
- There are other methods as well, to burn/poison Lara. (See just below.)

The methods to burn Lara:

a, Burn Lara, with an instant death:

- Classic, TRLE methods:

= If Lara steps on a light green floor square marked by the light green “Death” button, or gets over it on/in water.
= If the electric arc of a LIGHTNING_CONDUCTOR object with OCB=1 hits Lara.

- New, TRNG methods:

= If somebody/something activates an F63 in “Burning and immediate death” mode.
= If the electric arc of a FLAME_EMITTER3 with OCB=888 hits Lara.
= If Lara is in a damage room without a damage bar (see: DMG_INDIRECT_BAR), and there is a DMG_BURNING_DEATH constant in a Damage Script command, and the life energy runs out. (Buggy if the damage room is a water/quicksand pool.)
= If an electric arc of a Parameters=PARAM_LIGHTNING Script command hits Lara, and there is a LGTN_FIRE_LARA and a LGTN_KILL_TARGET constant in that command.

b, Burn Lara, her life energy will start decreasing:

- Classic, TRLE methods:

= If some “firestarter” Moveable object touches Lara. (So eg. she touches the flame of a FLAME_EMITTER, or a fireball – i.e. a BUBBLES object - of the SETHA hits her etc.)*/** (There are exceptions. Eg. the flame of a FLAME_EMITTER2 object is not harmful for Lara.)
= If somebody/something activates a FLAME object (placed anywhere in the map). *

The deactivation of the FLAME object won’t stop Lara’s burning. However, the next activation of the still active object will burn her again if she got extinguished meanwhile.*

- New, TRNG methods:

= If Lara touches a Static object (with “catch fire” feature).*/**
= If somebody/something activates an F63 in “Burning and decrease vitality” mode.*/**
= If Lara is in a damage room with a damage bar (see: DMG_INDIRECT_BAR), and there is a DMG_BURNING_DEATH constant in a Damage Script command, and the damage reaches the maximum.*/** (Buggy if the damage room is a water/quicksand pool.)
= If an electric arc of a Parameters=PARAM_LIGHTNING Script command hits Lara, and there is a LGTN_FIRE_LARA constant in that command.*/**

*: at least waist-deep water/quicksand will extinguish it right away.
**: F92 trigger will extinguish it right away.

c, Lara’s life energy will start decreasing, then she will be burnt (when her energy runs out):
TRNG method: if the electric arc of a FLAME_EMITTER3 with OCB=889 hits Lara. (The arc “follows” her till deactivated or her death.)

These methods are similar to each other:

a, The LIGHTNING_CONDUCTOR and FLAME_EMITTER3 methods are similar to each other, but there are differences between them. The PARAM_LIGHTNING method seems also similar but that is a pretty complex thing. - See Chapter 5 above.

b, The FLAME object and F63 methods are similar, but there are differences between them:

- FLAME cannot be extinguished by a trigger.
- If you want a “burning but unhurt Lara floating/swimming in the water/quicksand” effect, then the trigger activator is Lara, being in the pool and in the zone of the TRIGGER/COMBAT for the FLAME. F63 can’t do that effect.

c, The “Death” and F63 methods are similar, but there are differences between them:

- “Death” is not a trigger, so the overlapping rules (see “trigger interaction” tutorial on TRF) of the trigger won’t affect it, if there are triggers overlapped with a “Death” square.
- On dry land, “Death” will burn Lara only if she steps there. F63 will do that only in PAD mode, but if the precondition is TRIGGER or COMBAT, then Lara will catch fire anywhere in the trigger zone.
- Placed in pool floors, the “Death” won’t burn Lara over the water/quicksand surface – but, on the other hand, F63 in TRIGGER or COMBAT mode works “from floor to ceiling”, burning Lara even if she falls/jumps over the pool.
- F63 is able to burn Lara by somebody/something else (due to HEAVY mode). “Death” is not.
- F63 can be exported into Script/WADMerger. “Death” cannot.

The methods to poison Lara:

a, In TRLE:

- If SCORPION or HARPY stabs her with its tail.
- If SMALL_SCORPION stabs her with its tail. (Only in the fourth level or later. –You can try to fix it with variables. It is a bit risky so I won’t write it here. See “Current Level number (more updated than savegame memory) (Byte)” Code Memory Zone field in the Hidden Triggers tutorial.)
- If the dart of DART_EMITTER hits her. (The dart poisons Lara only for a moment. You can fix that bug - for a permanent poisoning - in TRNG, if you use a DRT_FIX_POISON_BUG flag in a Customize= CUST_DART Script command, or if you use a BUGF_DART_NO_POISON_LARA flag in a Custromize= CUST_FIX_BUG Script command.)

b, Only in TRNG:

- If Lara touches a Static object (with “poison” feature).
- If somebody/something activates an F113.
- If Lara steps into a damage room, and there is a DMG_POISON_LARA constant in a Damage Script command.

Lara will be recuperated from poisoning (it is naturally not really useful if she is still in that poisoning damage room):

- even in TRLE, if the player uses a medipack or
- only in TRNG, if somebody/something activates an F114.

Customization for Lara’s health in TRNG:

These are the possibilities:

- Enemy Script command is able to adjust how strong a weapon of an enemy is. (And see also there the EXTRA constants.)
- As you know, Lara’s health will be 100 % if she jumps a level. If you want her to keep the actual vitality when jumping a level, then use a Customize= CUST_KEEP_LARA_HP Script command.
- Use a Customize= CUST_SET_STATIC_DAMAGE Script command to customize the “hurt” or the “poison” value of the Static objects.

7. Invisibility/transparency of the objects

Don’t confuse them with each other:
Transparent objects are not the same as invisible objects. Transparent objects will always be visible at least a bit (and they always have the collision).

Invisibility:

In TRLE, these are the ways to make an object invisible:

- The object is textured totally magenta.
- Any Moveable object will be invisible in the game if you click on the Invisible button in its OCB panel. – See more about it just below.
- Creatures before activation are invisible.
- See eg. the mirror in coastal.prj original TRLE project: the crossbow in the “real” room is invisible, thanks to 256 typed in the OCB window, so the player will see only the reflection in the mirror.
- Some objects are invisible by default. See eg. light emitter nullmeshes or the mine.
- Empty meshes made by WADMerger.
- Place the pickable object on the same square where you placed a creature. This pickable object will be invisible in the game, till the creature drops it when he dies.

Objects having Invisible button pressed will show up only if you activate them.
Let’s see why this invisibility is useful:

- The object will show up only when you want.
- Sometimes breakable vase, box etc. (i.e. SHATTER) objects are hiding pickable objects. So the SHATTER and the pickable object are on the same square, that’s why Lara cannot see/reach the pickable object – only after the SHATTER has broken.
But it could a bit strange eg. if the SHATTER is a narrow vase so the pickable object will stick out of the vase. That’s why we use an Invisible button for that pickable item and a HEAVY trigger below the SHATTER will activate the pickable object, making that visible, only when the SHATTER shatters.
- Some creatures will be visible before their activations if they don’t have the Invisible button pressed. See eg. the horse or the wraiths.
- Some nullmeshes are visible in the game, but naturally we don’t want that. That’s why we need the Invisible button pressed at them. (See eg. the MAPPER nullmesh of the mechanical scarab setup.)
- The Invisible button pressed has an odd effect in the Obelisk setup of The Great Hypostyle Hall TRLR level: it will disable the pulley temporarily.

Triggers to deactivate that object are useless if you want to restore that invisibility. - Unless you type 2 in the OCB panel of the object.
But it works only with certain objects types. (Eg. it works with ANIMATINGs but doesn’t work with doors.)

Moreover, there is another problem: activation/deactivation not only removes/restores the invisibility, but it naturally activates/deactivates that object as well. Even if you don’t want to activate it.

If you use TRNG, then you can solve both the problems, if you use A13 trigger (in “hide” or “show” mode), instead of the Invisible button and instead of the activation/deactivation to make the object visible/invisible, because:

- any Moveable object can be either visible or invisible with this method, any time, and
- the object won’t be activated/deactivated this time.

You can achieve even new types of the invisibility with TRNG:

- A50 will turn a given mesh of a Moveable object into invisible.
- A51 will turn a given invisible mesh of a Moveable object into visible again.
- F189 will make the Static object invisible.
- F190 will make the invisible Static object visible again.
- F354 (in some modes of Window Timer) will make all the objects of the given Static ItemGroup visible/invisible.

Notes:

- Usually the invisible objects lose their collisions automatically and get them back when the visibility is restored – but, be careful, it is not always true.
- Be careful: if an object invisible by A13, then the game will handle it as if it were invisible by the Invisible button – so eg. a trigger to activate the object will also remove its invisibility.
- The invisibility of A50 is not savegame-stable, which means if you save the game after activating the trigger, and then load that savegame, then the effect of the A50 will be annulled.
It could be fixed with a NEF_SAVE_MESH_VISIBILITY constant in an Enemy Script command – but it seems to work only with creature meshes. (A method to solve the problem with non-creatures: export that A50 into a TriggerGroup, and activate it with a “continuous” F118 placed in the map, instead of activating it with an A50 placed in the map. Thanks to the continuous execution, the invisibility won’t stop till you activate an F192 and then loads the savegame or activate an A51.)

Transparency:

These are the possibilities if you want to see transparent object textures in TRLE:

- Some object editor (eg. StrPix) lets you apply semi-transparent texture tiles on the objects.
- The gradual transparency is something you can see only if an enemy dies and dissolves into nothing.
- Lara can also be transparent if the player hits the Look key.

In TRNG you have some other tools as well for the object transparency:

- Remove the dead enemy dissolution – with a CUST_KEEP_DEAD_ENEMIES Script constant.
- Remove Lara’s look-transparency – with a CUST_LOOK_TRASPARENT Script constant.
- “Shining and Transparent” function of Fast 3D tool in NG Center, to make all the texture tiles semi-transparent of the given mesh.
- Some triggers use transparency sometimes. See eg. F91 about Lara’s invulnerability which could make Lara blinking if she is just invulnerable.
- You can force a given grade of the transparency on the required Moveable or Static object:

= With Moveable objects: A53 to adjust the transparency in a scale from the totally opaque look to the totally transparent look. (See the same for Lara with F411 - only from TRNG 1.3.0.0!)
= With Static objects, there are two grades you can use: the so-called “glass” and “ice” transparency grade:

< 8 (glass) or 16 (ice) value typed in the OCB window of the object to add the transparency, or
< using triggers to add (F163, F164) or remove (F165) glass/ice transparency.

Use a CUST_STATIC_TRANSPARENCY Script constant to customize the glass or ice transparency level value.

8. Shatter/explode objects

These are your possibilities if you want to shatter/explode objects with TRLE:

- Place a SHATTER object somewhere and somebody/something will shatter it (mostly hitting by a bullet).
- Place a SMASH_OBJECT object somewhere. It will be shattered:

= only with exploding ammo, or
= only if it is activated, and if Lara jumps to that. (Eg. just think about the “window shatters when Lara jumps to that” object in TR2 Venice levels. It is something similar.)

- Place a SMASHABLE… object somewhere to smash them only with a vehicle. (It needs to be activated for the proper work.)
- Place a FALLING_BLOCK somewhere. They will shatter if Lara steps on them. (Or, if the value typed in OCB is not 0, then if you activate them.)
- The shield and the head of SKELETON objects can be shattered (if Lara’s bullet hits them).
- If a HAMMER (with OCB=1 or 3) hits a PUSHABLE_OBJECT at the end of the smashing movement, then the pushblock will shatter. (See NG Center what these OCB’s mean.)
- In the Obelisk setup of The Great Hypostyle Hall TRLR level, the electric arc will shatter an ANIMATING3.
- In the Lightning Conductor setup of the Street Bazaar TRLR level, the electric arc will shatter an ANIMATING8.
- In the Mine setup of the Trenches TRLR level, Lara is able to blow up harmful mines (invisible Mine objects) with a detonator – or stepping on them.
- Type Value 1 in the OCB window of a Mine object to make it visible. This Mine is harmless. Though, it starts burning if it has been activated – then, after some seconds, it will blow up. (One Shot is recommended in the trigger.)
- A nice pyrotechnical exploding effect will be performed if you activate a Grenade (!) object. But it works only if an active Mine object (with OCB=1) is on the grenade. (See more about it in the pyrotechnics tutorial on TRF.)
- Use a SWITCH_TYPE7 as your switch – which (or a part) can be shattered, shooting at that by Lara. (If there are more meshes then always the mesh with the highest ID is shatterable.)
- Lara drops a burning torch on a burning floor object, that will catch fire and crumble.
- Lara’s bullet hits the tank of the sentry gun to make it explode.

In TRNG you can use more new features as well to shatter/explode an object:

- Any Static object can act like a SHATTER.
See more about it in the description of CUST_SHATTER_RANGE constant, in NG Center.
- There are some new possibilities to shatter SHATTERs. Eg. type 16 in the OCB window of rollingballs to make them able to do that.
- Type Value 1024 in the OCB window of a SHATTER object. This SHATTER can be smashed only in a “hard” way, i.e. only by exploding ammo, SPHINX, motorbike, jeep, boulder, falling PUSHABLE_OBJECT.
- F160 will make any Static object shatter.
- F180 will make any Static object explode.
- Some modes of A14 will explode the given Moveable object.
- F354 (in some modes of Window Timer) will shatter/explode all the objects of the given Static ItemGroup.
- A trick to make the burning floor crumble by itself:
Activate a TriggerGroup with a “single” F118. The TriggerGroup contains three triggers: A54 to define the object, F263 to set 450 in a variable, and F257 to force that variable value into “Custom_D (Different usage in according with type of item) (Short)” Item Memory Zone field.
- You can make a mesh of any Moveable object slot shatterable (just like in the case of the SKELETON head/shield) if you activate a TriggerGroup with a “single” F118. The TriggerGroup contains three triggers: F292 to define the slot, F263 to set the given value in a variable, and F294 to force that variable value into “Shatterable meshes (Long)” Slot Memory Zone field.
The given value is the power of 2, assigned to the given mesh. Mesh0 is 0th power: 1, Mesh1 is 1st power: 2, Mesh2 is 2nd power: 4, Mesh3 is 3rd power: 8 etc.

Notes:

- If you want to shatter a SHATTER or (using a CUST_SHATTER_RANGE) another Static in the usual way (eg. shooting at it) then that won’t work if the horizontal size is bigger than one square. But if you shatter the object with F160 or F180 then the size doesn’t matter.
- “Shatterable meshes (Long)” field was called “Explosion Mask. (Each bit a type of weapon able to do explode it (Long)” before TRNG 1.2.2.7.
- If you use “Shatterable meshes (Long)” then the shattered mesh will be whole again if you load a savegame. If you want to fix that bug, then print it in the Script:

GlobalTrigger= 1, IGNORE, GT_CONDITION_GROUP, IGNORE, 1, 2, IGNORE
TriggerGroup= 1, A54 (to define the object), F256 (to put the actual value of “Visible Mesh Flags (each mesh a different bit) (Long)” Item Memory Zone field into another variable), F284 (a technical trigger to invert the minus sign in this new variable), C40 (to study if this new variable value is the “given value plus 1”).*
TriggerGroup= 2, F109 (to enable GlobalTrigger#2).
GlobalTrigger= 2, FGT_DISABLED, GT_LOADED_SAVEGAME, IGNORE, IGNORE, 3, IGNORE
TriggerGroup= 3, A50 (to make the given mesh invisible).

*: so eg. if it is Mesh3 and that is why the given value is 8, then you need to study 9 now.

You need to print a block like that for each object of the slot.

9. Animation ranges

Originally, you have only one type of animation ranges in the TRLE Room Editor Animation Ranges panel, and you can’t use triggers to control that.
As opposed to that, TRNG Room Editor Animation Ranges panel have more range types and you can use triggers to control them.

The TRNG range types are:

- Frames: use this for a classic range, when the tiles of the range are swapped for each other, automatically and continuously.
- P-Frames (maximum two of them per level): this tile won’t be animated, because this range is used to swap static (!) tiles for each other.
- Full-Rotate: imagine that as picture strips of independent frames - so the tile will be rolled on its square again and again, not caring about the other tiles of the range.
- Half-Rotate: this technique is made to use the TR3 type animated tiles when each tile contains four “micro” tiles – but it seems buggy. (See the basic animating textures tutorial on TRF if you’d like to know what you should do with TR3 animated tiles in TRNG.)
- River-Rotate: it works as a combination of a Frames and a Full-Rotate range: the tile will be scrolled but it will be swapped for another tile as well.

And these are the triggers to control the classic/new type ranges:

- F56 will stop the animation of any non-static (non-P-Frames) range.
- F57 will restart the animation of a stopped non-static range.
- Use an F58 for the first P-Frames range or an F59 for the second P-Frames range.
The triggers will swap the given static tile of the range for another static tile of the range. (That “another” tile is named in Timer window of the trigger. But the tile in Extra window of the trigger is the tile that is placed there originally, so it is not the tile that is just seen there, if you’ve swapped it yet.)
- F60 will invert the direction of the scrolling at Full-Rotate or River-Rotate ranges. (I recommend using each F60 only once.)
- You can create a “program” for a given P-Frames range (to swap the tiles with a given order and time).
The program can be defined by a TextureSequence Script command. This program is controlled by an F94 (to start the TextureSequence with the given ID on a given range) and an F95 (to stop the TextureSequence with the given ID). (It’s not recommended using a TextureSequence for more than one P-Frame range in a level.)

Notes:

- You can create maximum 99 TextureSequence commands for each level, choosing ID’s for them from a 1, 2, 3,… 998, 999 interval. However, the biggest ID in F94/F95 triggers is 128.
For the time being, TextureSequence with ID129-ID999 can’t be used for any purposes.
- You can choose “DEFAULT (from Script)” UVRotate value for some range types in Animation Ranges panel. It means you need an UVRotate Script command that will define that value.
- You have the possibility to customize the speed of the texture animation on WATERFALL objects, in TRNG: see Customize= CUST_WATERFALL_SPEED Script command.

10. Room effects

In TRLE, you had to switch on/off some buttons in Room Edit Buttons (O for outside rooms, W for water rooms, R for rooms with water reflection, M for mist rooms and NL for rooms without the sun disk effect) if you wanted to add/remove some effect on/off a room, and you had to use a flipmap, if you wanted to change between an “effect-less” and an effect-using version of the room.
There are new possibilities in TRNG, about room effects:

- you can add some new effects to a room, with some new buttons of Room Edit Buttons,
- you can use triggers to modify those effects in the game, without using flipmaps.

These are the new buttons:

- The useless D button has been removed and the NL button has been moved to a new position. The W button has been renamed into Normal and increased to fill the place of D, NL and W TRLE buttons.
Clicking on Normal button again and again, the text on the button will change: Water, Snow, Rain, Q-Sand. - So this is the way to create water, snow, rain or quicksand (swamp) in the selected room.
Snow, rain or quicksand also has some intensity, shown in the well-known water intensity box.
- DMG button will turn the selected room into a so-called damage room, in which Lara’s health will be permanently decreased (shown by a new bar, the damage bar) by itself.
- Cold button will turn the selected room into a so-called cold room, in which you will see Lara’s frosty breath. If the cold room is a water room, then it means the water is icy here, so Lara’s health will be permanently decreased (shown by a new bar, the cold bar) by itself.

Notes:

- If we want to be really correct about rain/snow then I must tell that you need to do all of this if you want to see rain/snow in a room:

= A Rain/Snow Script command (or an F157/F156 trigger, see below).
= The Rain/Snow button is pressed in the room. (Except with RAIN/SNOW_ALL_OUTSIDE in the Script commands.)
= The room must be an outside room (with Button O).
= There must be at least one “invisible texture tile” (the tiny black square of the Color Palette) placed in the room.
= The proper room geometry: the room (or the stack of the rainy/snowy rooms) must be high enough and the actual camera can’t be too close to the ceiling.
= Only with snow: the actual camera must look at one door (portal) at least.

- You can customize rain properties with a Customize= CUST_RAIN Script command.
- Use a Damage or Customize= CUST_BAR Script command to customize the damage or cold bars, for damage or cold+water rooms.

You can use these FLIPEFFECT triggers to change the room effects in the game:

- F115 will set the room as an outside/water/snow/rain/quicksand/damage/cold room. F116 will remove that feature.
- F117 will change the rain/snow intensity in the given room.
- F157 will change the Rain Script command value (all/disabled/single) in the level.
- F156 will change the Snow Script command value (all/disabled/single) in the level.
- F361 will fix a possible bug in a given spot (i.e. where the trigger will be placed), next to the given room: if you see the wrong rain intensity in the given (rainy) room, though you are next to that rainy room. (It seems useless with a similar snow bug.)

Notes:

- Some FLIPEFFECTs (see eg. F115 or F116) use rooms as parameters. – But be careful with that room list:

= Never choose “Flipped” names from the room list – because these triggers don’t affect flipped rooms.
= If you create/remove a room in TRNG with less ID than the room ID in the FLIPEFFECT, then the FLIPEFFECT will fail, indicating the wrong room hereafter.

- F115/F116 triggers are useful with/instead of flipmaps. – For example:

= The original room is a rainy room. We use an F116 trigger to stop raining there, then later we activate the flipped room of the room to make the room to be a water room. – Flipmaps can achieve two statuses in the same room (eg. to switch on/off the water room), but, as you see, now we used three statuses.
= You have ten big rooms, and you want to turn them into cold rooms with flipmaps. So you need the flipmaps now only to make the rooms cold. Which means you will push some limits of the Room Editor unnecessarily. (Because eg. the ten cold flipped rooms mean ten new rooms now.) So, instead of using flipmaps, use F115 to turn them into cold rooms.

You can also use F115/F116 even to mix statuses, if that is logical. Eg. you can use F115 to switch on the snow in a room which is a rain room as well (though that is also possible using both RAIN_ALL_OUTSIDE and SNOW_ALL_OUTSIDE) – but naturally you can’t mix eg. water+rain statuses in the same room at the same time.
- F117 will affect both the original and the flipped version of the room (if there is a flipped version, too).
- F117 won’t change the intensity if the room doesn’t have Rain/Snow button switched on. - So it won’t affect the intensity of rainy/snowy outside rooms in RAIN/SNOW_ALL_OUTSIDE case if those rooms don’t have Rain/Snow button switched on.
But the trigger will always change the intensity if the room has Rain/Snow button switched on. (Or if rain/snow effect is added to the room by F115.) - So it will also affect the intensity in the indoor rooms with Rain/Snow button switched on, though, it doesn’t rain/snow there, because it is not an outdoor room.
To activate the new intensity in RAIN/SNOW_ALL_OUTSIDE case for all the outdoor rooms, you will always need to step into an outdoor/indoor room with Rain/Snow button on, after activating F117.
- Speaking of intensity:
The room can always “remember” its own previous intensity, if you don’t change it. – Here are two examples to understand:

= The room is a Rain room, with Intensity 3. You activate a flipmap with that room, to turn it into a snowy room. Now the snow intensity remains 3. - Since each room can apply maximum one water/snow/rain/quicksand intensity in the intensity window.
= The room is a “dry room” and you use an F115 to turn it into a water room. F115 doesn’t use an intensity parameter, so the water won’t have intensity (because the dry status before that didn’t have intensity either). The lack of the water intensity means the water surface won’t wave and there won’t be the usual “shining effects” in the water.

Mirror rooms:

The classic Mirror Script command is still useable but obsolete to define mirror rooms in TRNG. Use the new MirrorEffect Script command instead, which has new features.
Moreover, there is a new trigger, F88, which is able to switch on/off the mirror in mirror rooms.

11. Object position

There are some methods in TRLE to put the selected object into a new position, even without activating it in the game: moving them with CTRL+arrows, rotating them with right-clicking on them etc.
But TRNG let you move/rotate any Moveable/Static objects during the game, with or without object activation, using triggers (probably a lot of them will work with Lara as well):

a, Moving objects linearly:

- Moveable objects:

= A29, A36: moving linearly, continuously back and forth.
= A30, A31, A32, A33, A34, A35: moving linearly.
= A63, A64, A65, A66, A67, A68: jerking linearly.
= F167: moving linearly, according to a given “program”. (The “program” is defined in a Parameters Script command that uses a PARAM_MOVE_ITEM constant.)
= F137 or F144 will move all the objects of the given Moveable ItemGroup linearly, continuously back and forth.
= F138, F139, F140, F141, F142 or F143 will move all the objects of the given Moveable ItemGroup linearly.

- Static objects:
F166: moving linearly, according to a given “program”. (The “program” is defined in a Parameters Script command that uses a PARAM_MOVE_ITEM constant.)

b, Rotating objects:

- Moveable objects:

= A5: rotating endlessly around its vertical axis.
= A18, A19, A20, A21: rotating around its vertical axis, till reaching a given direction.
= A1, A2, A3, A4: rotating around its vertical axis, till turning a given degrees.
= A11, A12: jerking around its vertical axis.
= A80: rotating around a vertical axis that is in the given distance from the object.
= A10: rotating endlessly around its horizontal axis.
= A22, A23, A24, A25: rotating around its horizontal axis, till reaching a given direction.
= A6, A7, A8, A9: rotating around its horizontal axis, till turning a given degrees.
= F173: rotating around its horizontal/vertical axis, according to a given “program”. (The “program” is defined in a Parameters Script command that uses a PARAM_ROTATE_ITEM constant.)

- Static objects:
F172: rotating around its horizontal/vertical axis, according to a given “program”. (The “program” is defined in a Parameters Script command that uses a PARAM_MOVE_ITEM constant.)

Notes:

- The difference between “moving” and “jerking” is the jerking movements are used only to correct the improper positions. (So the player mustn’t see those sudden movements.)
- Sometimes you may experience that Lara looks in a given direction if she activates some triggers, for example, some ACTION triggers to move something. (As if a standalone TARGET trigger were there where she is.) If you experience that then you can solve the problem, if you export that problematic trigger in a TriggerGroup, activating it with an F118.
- As you see, there are no triggers to start the rotative movements of all the objects of the given Moveable ItemGroup or to start any movements of all the objects of the given Static ItemGroup, so you need to start those movements for each object, one by one.

These are the possibilities to adjust the speed of moving/rotating:

a, For ACTION triggers:

- In the cases of jerking actions is meaningless to talk about speed.
- Moving linearly (not jerking):

= if it is an ANIMATING then type the speed value in the OCB window,
= if it is another Moveable object then use a Customize= CUST_SPEED_MOVING Script command.

- Rotating (not jerking):

= usually you adjust the speed in the trigger, or
= when you use an A80 trigger, then type the speed value (bigger than 127) into the OCB window of the object.

b, For FLIPEFFECT triggers:
You can adjust the speed in the Parameters command.

These are the possibilities to stop moving/rotating:

a, It stops by itself.
b, Usually you can stop the linear/rotative movements of Moveables, if you activate an A47 trigger.
c, Special methods to stop Moveables:

- If you use A80 then it’s better if you stop the rotation by activating A81 because now the mode of the stop is customizable.
- F178 will stop all the Moveables in a given room that have been moved by PARAM_MOVE_ITEM.
- F176 will stop all the Moveables in a given room that have been rotated by PARAM_ROTATE_ITEM.
- F147 will stop the linear/rotative movements of all the objects of the given Moveable ItemGroup.

d, Methods to stop Statics:

- F179 will stop all the Statics in a given room that have been moved by PARAM_MOVE_ITEM.
- F177 will stop a given Static that has been moved by PARAM_MOVE_ITEM.
- F175 will stop all the Statics in a given room that have been rotated by PARAM_ROTATE_ITEM.
- F174 will stop a given Static that has been rotated by PARAM_ROTATE_ITEM.
- F354 in “Statics. Move. Stop the motion” mode will stop the linear movements of all the objects of the given Static ItemGroup.
- F354 in “Statics. Move. Stop all rotations” mode will stop the rotative movements of all the objects of the given Static ItemGroup.

Note:
If you use A81 in “Pause” mode, then the object will stop immediately. It is useful, if you want to restart the rotation again later, but with the same axis. – But don’t use A80 for the re-activation now, use A85 instead.
In non-Pause mode the axis will be recalculated in the stopped position – so that new axis will be used, when activating A80 the next time.

Special methods to change object positions:

a, “Rotate”, “Move” and “Mirroring” functions of Fast 3D tool in NG Center will rotate/move the given mesh.
b, A40 will transport the Moveable object to a LARA_START_POS object with a given OCB value.
c, Some triggers are able to drag Moveable objects in a given direction:

- A73, A74, A75, A76 will drag the object touching the floor anywhere in the level.
- A69, A70, A71, A72 will drag the object over the floor anywhere in the level. (It is useful to drag eg. flying/swimming enemies.)

Notes for dragging:

- Don’t misunderstand: when the dragged object must be on the floor, then the trigger activator (Lara or else) can be even over the trigger square.
On the other hand, when the dragged object must be over the floor, then the trigger activator can be even on the trigger square.
- This method is special, because the triggers are multiple by default, so eg. while an enemy is standing on a HEAVY floor to activate a trigger like that, for himself, then the enemy will be dragged continuously as if he were standing on a conveyor.

Lara’s position:

Even Lara can be moved without the usual methods into a new position:

- F79 will transport Lara to a LARA_START_POS object with a given OCB value.
- F134, F135 or F158 will drag Lara in a given direction. (See just above, how.)
- F136 will adjust the gravitation, i.e. push Lara upwards or pull her downwards.
- F349 or F350 will simulate a whirl in the water (positioned at a LARA_START_POS object with a given OCB value) that will drag Lara to itself.

12. Object size

Some object editor (eg. Metasequoia) is able to resize the objects either for TRLE or TRNG.
But if you use TRNG then you can also use these tools to resize them:

- “Scaling” function of Fast 3D tool in NG Center, to resize a mesh.
- F352 will resize a Static object (or all the objects of a Static ItemGroup) during the game, which new size is defined in a Parameters Script command with a PARAM_SCALE_ITEM constant. F353 can stop the size change if that is continuous.

13. Inventory contents

Only these are the TRLE methods if you want to change the inventory contents:

- Picking up/using an item.
- ResetHUB command will put back all the pickup items of the level left on the map, as if they hadn’t been picked up yet – though “only” all the Key, Puzzle, Pickup and Examine items (including combos) will be removed from the inventory, arriving to the next level.
- RemoveAmulet Script command will remove QUEST_ITEM1 from the inventory if the level starts.
- KEY_ITEM12 will remain in the inventory after using it in a receptacle.

But you can also use these new methods in TRNG:

- You can prevent the item-removing effect of the ResetHUB command (except at Examine), if you use a PreserveInventory Script command at the level left.
- Equipment Script command (only at the level, which is the first level of your game) will define the amount of an inventory item (weapon, ammo, medipack, key etc.) that Lara will have in the inventory when the game starts, from zero to infinite.
- F48 will give another copy of the selected item to the inventory. F49 (only at multipliable items, i.e. of which you can have even more than one copy at the same time in the inventory) will take a copy of that item from the inventory. (Never use it to remove a weapon!)
- F47 will take all the copies of that item. (Never use it to remove a weapon!)
- F50 (only at multipliable items) will set the amount of the copies of that item, in the inventory.
- F96 will take the weapons/ammo from Lara.
- Customize= CUST_SET_INV_ITEM Script command will make the required key (key and puzzle items, excluding combos) infinite, even after using them.

Made using TRNG 1.2.2.7.

Last edited by AkyV; 05-12-16 at 12:46.
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 19:39.


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