DOCUMENTATION for EGYPTIAN DREAM - Tutorial
DOCUMENTATION for EGYPTIAN DREAM - Tutorial
By Pascal Ducey
Download the project source:
Download
This tutorial has been
written in conjunction with the corresponding project MagpTut1. Here are the
files included in the project :
-
maps\MagpTut1\MagpTut1.PRJ : source of the projet.
-
maps\MagpTut1\MagpTut1.TGA : textures
-
maps\MagpTut1\MagpTut1.TBM : texture sounds
-
maps\MagpTut1\MagpTut1.TFX : texture sounds
- maps\MagpTut1\Script\SCRIPT.TXT
: source script file
- maps\MagpTut1\Script\ENGLISH.TXT
: source script file in english
- maps\MagpTut1\Script\FRENCH.TXT
: source script file in french
Here is what I explain
in this documentation. Click on a link to go to the subject.
- Distance fog effect
FOG
- Mist effect
MIST
- Mirror effect
MIRROR
- Puzzles with PUSHABLE_OBJECTS
- Multiple switches/doors
arrangements SWITCH - DOOR
- Using TWOBLOCK_PLATFORM
- Using SCALES
- Using SEQUENCE_SWITCH
- Using ELEMENT_PUZZLE (water/oil/sand)
- TRAVELLING CAMERA
: The camera follows Lara during her moves
- How to build your
own SCRIPTS
To have a better idea of
what is explained here, open the project with the room editor.
|
2. Syntax used in this tutorial |
When you see a green
color word in this document, refer to its
explanation here to know what it means.
- STT
Window : "Set Trigger Type" window in the room editor.
- TT :
Trigger Type, like TRIGGER, PAD, HEAVY, etc.
- Trigger :
square used to trigger an action.
- STT
Flags : buttons 1 to 5 from STT Window.
- OCB
Window : "Object Code Bit" window in the room editor.
- OCB
Flags : buttons 1 to 5 from OCB Window.
- OCB
Value : value indicated in the OCB Window.
- TCombi :
means the whole flags set to create the combination 1-2-3-4-5 in order to
trigger an action. It can be a mix of the flags from both STT Window and OCB
Window.
- RGB : Red
Green Blue components of a color.
- "Room##"
: indicates the project rooms to select in the room editor.
STT Window
OCB Window

The notation used for the STT Flags
will be
1-2-3-4-5 here
The notation used for the OCB Flags
will be1-x-x-x-5 here. "x" means the button is unpressed.
For more details about the STT Window
and the OCB Window, refer to the manual supplied with the Level Editor.
|
3. Introduction to all the subjects |
Back to top
DISTANCE FOG EFFECT
Without
With

You can easily see the
difference on the pictures. With the use of the distance fog, you can realise
large rooms over the limit of 20 squares, and then avoid the "end of world" bug.
Indeed, this effect creates a progressive blur effect on the distance textures.
Note the difference between textures between the two obelisks. You can see that
the textures are "broken" in the 1st picture. Note the same effect on the
textures of the sand hills.
How to set up
the distance fog effect :
- Turn OFF the [volumetric
effects] in the game setup (run "setup.exe" in your TRLE folder).
- Add the following
line "Fog="
in your "script.txt" file.
[Level]
Name= Egyptian dream - tutorial
Legend= Turn OFF the Volumetric FX...
Horizon= ENABLED
Fog= 152,192,216
Puzzle= 4,Jewel of Apophis,
$0000,$0400,$0000,$0000,$0000,$0002
Puzzle= 7,Guardian Key,
$0009,$0300,$0000,$0000,$0000,$0002
Puzzle= 12,Golden Beetle,
$0008,$03b0,$0000,$e000,$0000,$000a
Pickup= 1,Bag of Sand,
$0000,$0400,$0000,$2000,$1000,$8002
Pickup= 2,Jerrycan,
$0015,$0500,$4000,$f000,$0000,$4002
Examine= 2,The Sphinx's map,
$0000,$0500,$0000,$0000,$0000,$0002
Mirror= 52,$BC00
LoadCamera= 72000,-280,44029,73827,-811,46221,13
Level= DATA\MAGPTUT1,107
Don't forget to include the line
"Horizon=" in order to activate the display of the
correcponding object of your wad.
The 3 values following the line "Fog="
indicate the
RGB value of the fog. This color must
match the HORIZON color used in your wad. In this project, the horizon is a
clear bleu sky with
RGB=152,192,216
Restrictions :
- As the volumetric effects are
off, you can't use the FOG_BULB effects. So, no FLIPEFFECT 28 too.
- The HORIZON object included in
your wad must use a constant color. So, no mountains, buildings or something
like that. If you look at this project, you'll see I've added a planet, but
it's above the horizon line, so the blur effect doesn't affect the display.
N.B. :
If you use a black horizon (RGB=0,0,0),
you don't need to create the distance fog effect, as it's automatically
rendered in the game.
Back to top
MIST EFFECT
Look at the rooms "Room16"
(mist room), "Room12" and "Room13"
(rooms above).
To activate this effect, press the
[M] button in the window [Room edit buttons]. Then, you just have to adjust
the intensity with a value from 1 to 4.
ground mist

You build these different rooms the
same way as you build water rooms. Indeed, and the result in light is the same.
To make this effect more realistic, use a particular texture you apply to the
connection between the room above and the mist room. Don't forget to press [Toggle
Opacity 2] and [transparent]. No need for an animated texture.

Back to top
MIRROR EFFECT
Look at the rooms "Room52"
(where Lara walks), and "Room54" (room
imitating the mirror). For more details, refer to the TRLE manual, page 74.

How to set up the
mirror effect :
- Create 2 rooms,
one where Lara will be, and one imitating the mirror. The mirror room must
be at the left of Lara's room, and connected with only one door. To create
the mirror room, copy Lara's room and apply to this copy the "mirror" effect
from the menu "Room".
- Apply to the
connection door a transparant texture representing the mirror itself. Don't
forget to press [Toggle Opacity] and [Transparent].
- "Ghost" objects that
can be seen in the mirror during the game, must be put in the mirror room, the
left one (see the different flames). If Lara can pick up some objects, they
must be put in Lara's room too (see "shotgun ammos"). Thus, enter the value 256
in the OCB Window for each item in Lara's
room.
- Write the up
left square coordinates of Lara's room, as shown in the following picture :

- Calculate the hex
value corresponding to (X+1)*1024. To do this, open the Windows Calculator.
Here, (46+1)*1024 = 48128 and
48128 gives BC00.
- Add the following
line "Mirror="
in your "script.txt" file.
[Level]
Name= Egyptian dream - tutorial
Legend= Turn OFF the Volumetric FX...
Horizon= ENABLED
Fog= 152,192,216
Puzzle= 4,Jewel of Apophis,
$0000,$0400,$0000,$0000,$0000,$0002
Puzzle= 7,Guardian Key,
$0009,$0300,$0000,$0000,$0000,$0002
Puzzle= 12,Golden Beetle,
$0008,$03b0,$0000,$e000,$0000,$000a
Pickup= 1,Bag of Sand,
$0000,$0400,$0000,$2000,$1000,$8002
Pickup= 2,Jerrycan,
$0015,$0500,$4000,$f000,$0000,$4002
Examine= 2,The Sphinx's map,
$0000,$0500,$0000,$0000,$0000,$0002
Mirror= 52,$BC00
LoadCamera= 72000,-280,44029,73827,-811,46221,13
Level= DATA\MAGPTUT1,107
Value 52 corresponds
to Lara's room.
N.B. :
Don't forget that only Lara is really shown in the mirror during the game.
Also remember that if you move the rooms in the [Editor Window Panel] of the
room editor, you'll have to calculate the hex value again and change the
script.
Back to top
PUZZLES WITH
PUSHABLE OBJECTS
There are 2 kinds of
puzzles :
- those where each
pushable object can be placed wherever on the squares triggering an action.
- those where each
pushable object must be placed on its corresponding square.

Therefore, we have
several possibilities for each of these 2 kind of puzzles.
>> FIRST CASE : 1 or several PUSHABLE_OBJECTs
for a global action, with no reserved square
Look at the rooms "Room6"
and "Room7". In the room #6,
you can see 2 PUSHABLE_OBJECTS for 2 separate global actions :
- the opening of the 2
central doors
- the raising of 2
blocks in the room #7 (RAISING_BLOCK1)
Generally, for each
separate action, each PUSHABLE_OBJECT can be placed on any tile, and when all
the objects are placed, the action is triggered. The following array shows how
to codify the different triggers (exemple with 2 PUSHABLE_OBJECTS and 2
triggered objects) :
|
|
TT |
STT
Flags |
OCB
Flags of the
PUSHABLE_OBJECT |
OCB Flags
of
the
triggered object |
|
1st Trigger |
HEAVY for object #1 |
1-x-x-x-x |
|
|
|
|
TRIGGER for object #2 |
1-2-3-4-5 |
|
|
|
2nd Trigger |
HEAVY for object #1 |
x-2-3-4-5 |
|
|
|
|
TRIGGER for object #2 |
1-2-3-4-5 |
|
|
Note the combination
1-2-3-4-5 for each simple TRIGGER. As the previous TT
on the same square is an HEAVY trigger, the other TT
are automatically the same.
>> SECOND
CASE: several PUSHABLE_OBJECTs for one global action, with reserved square
Look at the rooms "Room0"
and "Room3". In the room #0,
there are 4 PUSHABLE_OBJECTS for 1 global action, which is the opening
of the central TRAPDOOR1 and the activation of the water fan (ANIMATING1 in
room #3) at the same time. All the 4 PUSHABLE_OBJECTS must be placed on their
corresponding squares to trigger this action. Each
trigger must be codified in conjunction with the corresponding
PUSHABLE_OBJECT. If another PUSHABLE_OBJECT is placed on this
trigger, nothing happens. Therefore, it's
not a HEAVY, but a HEAVYSWITCH. See the following arrays to know how to set up
the different triggers (example with 4 PUSHABLE_OBJECTS and 2 triggered
objects).
Example #1 :
|
|
TT |
STT
Flags |
OCB
flags of the
PUSHABLE_OBJECT |
OCB
Flags
of
the triggerd object
|
|
1st Trigger |
HEAVYSWITCH for object #1 |
1-x-x-x-x |
1-x-x-x-x |
x-x-x-x-5 |
|
|
TRIGGER for object #2 |
1-2-3-4-5 |
|
x-x-x-x-5 |
|
2nd Trigger |
HEAVYSWITCH for object #1 |
x-2-x-x-x |
x-2-x-x-x |
|
|
|
TRIGGER for object #2 |
1-2-3-4-5 |
|
|
|
3rd Trigger |
HEAVYSWITCH for object #1 |
x-x-3-x-x |
x-x-3-x-x |
|
|
|
TRIGGER for object #2 |
1-2-3-4-5 |
|
|
|
4th Trigger |
HEAVYSWITCH for object #1 |
x-x-x-4-x |
x-x-x-4-x |
|
|
|
TRIGGER for object #2 |
1-2-3-4-5 |
|
|
The empty cells mean
there's nothing special to do.
Note that there are
only 4 triggers, and to complete the
TCombi, the 5th flag is activated on the
triggered objects.
Look also at the rooms
"Room58",
"Room59" and "Room60"
for an example with only 2 PUSHABLE_OBJECTs. In this case, this is the 3rd,
4th and 5th flags that are activated on the triggered object. Of course, you
can do the same in a different way :
Example #2 :
|
|
TT |
STT
Flags |
OCB
Flags of the
PUSHABLE_OBJECT |
OCB
Flags
of
the triggered object
|
|
1st Trigger |
HEAVYSWITCH for object #1 |
1-x-x-x-x |
1-x-x-x-x |
|
|
|
TRIGGER for object #2 |
1-2-3-4-5 |
" |
|
|
2nd Trigger |
HEAVYSWITCH for object #1 |
x-2-x-x-x |
x-2-x-x-x |
|
|
|
TRIGGER for object #2 |
1-2-3-4-5 |
" |
|
|
3rd Trigger |
HEAVYSWITCH for object #1 |
x-x-3-x-x |
x-x-3-x-x |
|
|
|
TRIGGER for object #2 |
1-2-3-4-5 |
" |
|
|
4th Trigger |
HEAVYSWITCH for object #1 |
x-x-x-4-5 |
x-x-x-4-5 |
|
|
|
TRIGGER for object #2 |
1-2-3-4-5 |
" |
|
Note the difference.
Here, the 4th trigger and the 4th
PUSHABLE_OBJECT have the flags 4 and 5 activated, in order to complete the
TCombi. Therefore, no flag activated on
the triggered objects.
>> THIRD CASE : several PUSHABLE_OBJECTs
for a global action and several secondary actions, with reserved squares
Look at the room "Room31".
There are 4 PUSHABLE_OBJECTS for 1 global action, and several
secondary actions linked to each well placed object. The global action is
seen at the centre of the room. It's the explosion fo the blue pyramid (MINE),
the activation of the blue blinking light (AMBER_LIGHT), the activation of the
vertical electric arc (LIGHTNING_CONDUCTOR) and the lowering of the invisible
block (RAISING_BLOCK2). The secondary actions are the activation of 4 blue
electric arcs (FLAME_EMITTER3) placed on the same square as the
triggers. These actions are important,
because they indicate to the player thata PUSHABLE_OBJECT is placed on the
correct square.
As for the 2nd case,
the global action is only triggered when all the 4 PUSHABLE_OBJECTs are placed.
But, the 4 secondary actions will play each time a PUSHABLE_OBJECT is placed.
Generally, the 2 previous examples are correct, speaking of the
Tcombi. But, in this project, there's a
restriction : the RAISING_BLOCK2. Indeed, this block is already activated
before the puzzle, so it's the only object which acts in the opposite way of
the others. So, and as it's impossible to use ANTITRIGGER in this kind of
puzzle, you must press all the OCB Flags
(1-2-3-4-5) of the block. Therefore, it's impossible to set the
triggers the same way as in the 1st
example of the 2nd case.
So, to set up the
different triggers, so that the
Tcombi is complete, follow these
instructions : example with 4 PUSHABLE_OBJECTs, 3 objects for the main action
(G_object #n), and 2 objects for the secondary actions (S_object #n).
|
|
TT |
STT
Flags |
OCB Flags
of the
PUSHABLE_OBJECT |
OCB
Flags
of
the triggered object
|
|
1st Trigger |
HEAVYSWITCH for G_object #1 |
1-x-x-x-x |
1-x-x-x-x |
|
|
|
TRIGGER for G_object #2 |
1-2-3-4-5 |
|
|
| |
TRIGGER
for G_object #3 |
1-2-3-4-5 |
|
|
| |
TRIGGER
for S_object #1 |
1-2-3-4-5 |
|
x-2-3-4-5 |
| |
TRIGGER
for S_object #2 |
1-2-3-4-5 |
|
x-2-3-4-5 |
|
2nd Trigger |
HEAVYSWITCH for G_object #1 |
x-2-x-x-x |
x-2-x-x-x |
|
|
|
TRIGGER for G_object #2 |
1-2-3-4-5 |
|
|
| |
TRIGGER
for G_object #3 |
1-2-3-4-5 |
|
|
| |
TRIGGER
for S_object #1 |
1-2-3-4-5 |
|
1-x-3-4-5 |
| |
TRIGGER
for S_object #2 |
1-2-3-4-5 |
|
1-x-3-4-5 |
|
3rd Trigger |
HEAVYSWITCH for G_object #1 |
x-x-3-x-x |
x-x-3-x-x |
|
|
|
TRIGGER for G_object #2 |
1-2-3-4-5 |
|
|
| |
TRIGGER
for G_object #3 |
1-2-3-4-5 |
|
|
| |
TRIGGER
for S_object #1 |
1-2-3-4-5 |
|
1-2-x-4-5 |
| |
TRIGGER
for S_object #2 |
1-2-3-4-5 |
|
1-2-x-4-5 |
|
4th Trigger |
HEAVYSWITCH for G_object #1 |
x-x-x-4-5 |
x-x-x-4-5 |
|
|
|
TRIGGER for G_object #2 |
1-2-3-4-5 |
|
|
| |
TRIGGER
for G_object #3 |
1-2-3-4-5 |
|
|
| |
TRIGGER
for S_object #1 |
1-2-3-4-5 |
|
1-2-3-x-x |
| |
TRIGGER
for S_object #2 |
1-2-3-4-5 |
|
1-2-3-x-x |
Note the
OCB Flags of the secondary objects. They
simply complete the
Tcombi of the main action, so that these
objects are triggered each time a pushable object is placed.
>> FOURTH CASE : several PUSHABLE_OBJECTs combined
with the object PLANET_EFFECT
This is similar as the
3rd case, but the PLANET_EFFECT is used for the secondary actions. Thus, an
OCB Value is indicated for each
PUSHABLE_OBJECT and PLANET_EFFECT. The purpose of this is to "freeze" each
PUSHABLE_OBJECT when placed. Then it's impossible to move it again. Look at
the project "Library"
supplied with the level editor, room "Room23".
Back
to top
MULTIPLE SWITCHES
- DOORS ARRANGEMENTS
The following examples
figure only doors and flames, but of course, you can use all the possible
triggered objects, like Blocks, Animatings, Ennemies, etc...

>> FIRST CASE : 2 switches for
one door
This is the simplest
example. Look at the room "Room9".
Generally, set up the différent triggers
as follows :
|
Triggers
on the same square of each switch
|
TT |
STT
Flags |
|
1st Trigger |
SWITCH for Switch #1 |
1-x-x-x-x |
|
|
TRIGGER for Door #1 |
1-2-3-4-5 |
| 2nd
Trigger |
SWITCH
for Switch #2 |
x-2-3-4-5 |
| |
TRIGGER
for Door #1 |
1-2-3-4-5 |
>> SECOND CASE : several
switches for several doors with arrangements
The arrangements are
important, because it means that the use of the correct switches triggers the
opening of one door among the others. To open the other doors, always one by
one, another group of switches must be used. So, in this project, as there are
4 doors, there are 4 possible arrangements, with a combination of 3 switches
among 4 :
- Switches 1/2/3
for door 1
- Switches 1/3/4
for door 2
- Switches 1/2/4
for door 3
- Switches 2/3/4
for door 4
All the arrangements
are used. Remember that the combinations 1/3/2, 2/1/3, 2/3/1, 3/1/2 and 3/2/1
are exactly the same as 1/2/3. The final result is that those 3 switches are
used. The puzzle is of course not limited to 4 doors, but it's limited to 5
switches because of the Tcombi.
Supposition : if there
are 5 doors, there are 5 arrangements. Therefore, there are also 5 switches
combined 4 by 4. The arrangemets are :
- Switches 1/2/3/4 for
door 1
- Switches 1/2/3/5 for
door 2
- Switches 1/2/4/5 for
door 3
- Switches 1/3/4/5 for
door 4
- Switches 2/3/4/5 for
door 5
One more time, all the
arrangements are covered. But, let's consider this project. Look at the room "Room49".
There are 4 switches, 4 doors and 4 flames. Each flame above each door turns
on when the door opens, and turns off when the door closes. By the way, when
an arrangement of switches is used, the corresponding door and flame are
activated, and the others automatically untriggered. Set up the different
triggers as follows :
|
Triggers
on the same square as each switch |
TT |
STT
Flags |
OCB
Flags
of
triggered objects
|
|
1st Trigger |
SWITCH for Switch #1 |
1-x-x-x-x |
|
|
|
TRIGGER for Door #1 et Flame
#1 |
1-2-3-4-5 |
x-x-x-4-5 |
| |
TRIGGER
for Door #2 et Flame #2 |
1-2-3-4-5 |
|
| |
TRIGGER
for Door #3 et Flame #3 |
1-2-3-4-5 |
|
| |
TRIGGER
for Door #4 et Flame #4 |
1-2-3-4-5 |
|
|
2nd Trigger |
SWITCH for Switch #2 |
x-2-x-x-x |
|
|
|
TRIGGER for Door #1 et Flame
#1 |
1-2-3-4-5 |
|
| |
TRIGGER for Door #2 et Flame
#2 |
1-2-3-4-5 |
x-2-x-x-5 |
| |
TRIGGER for Door #3 et Flame
#3 |
1-2-3-4-5 |
|
| |
TRIGGER for Door #4 et Flame
#4 |
1-2-3-4-5 |
|
|
3rd Trigger |
SWITCH for Switch #3 |
x-x-3-x-x |
|
|
|
TRIGGER for Door #1 et Flame
#1 |
1-2-3-4-5 |
|
| |
TRIGGER for Door #2 et Flame
#2 |
1-2-3-4-5 |
|
| |
TRIGGER for Door #3 et Flame
#3 |
1-2-3-4-5 |
x-x-3-x-5 |
| |
TRIGGER for Door #4 et Flame
#4 |
1-2-3-4-5 |
|
|
4th Trigger |
SWITCH for Switch #4 |
x-x-x-4-x |
|
|
|
TRIGGER for Door #1 et Flame
#1 |
1-2-3-4-5 |
|
| |
TRIGGER for Door #2 et Flame
#2 |
1-2-3-4-5 |
|
| |
TRIGGER for Door #3 et Flame
#3 |
1-2-3-4-5 |
|
| |
TRIGGER for Door #4 et Flame
#4 |
1-2-3-4-5 |
1-x-x-x-5 |
Note that only the 4th
flag STT is activated for the 4th
trigger. The rest of the
TCombi is determined by the
OCB flags of the different objects.
So, to determine which
switch combination triggers the different objects, write their activated
flags OCB and determine the rest of the TCombi :
- For Door #1 and Flame #1,
it's the switch arrangement 1/2/3
- For Door #2 and Flame #2,
it's the switch arrangement 1/3/4
- For Door #3 and Flame #3,
it's the switch arrangement 1/2/4
- For Door #4 and Flame #4,
it's the switch arrangement 2/3/4
Remember that this
kind of puzzle requires a huge amount of triggers.
Only for this example, there are 36 triggers,
as each object must be trggered on each trigger square.
Back
to top
USING TWOBLOCK_PLATFORMS
There are 2 ways of
using these platforms :
>> FIRST CASE : platforms used
as lifts
Look at the rooms "Room33",
"Room37", "Room45"
and "Room46".
In these different
examples, each platform takes Lara up to a different floor. It means each
platform lifts to a different height. To do this, enter a different
OCB Value for each TWOBLOCK_PLATFORM :
OCB Value = H*16 + V
H means the
height in clicks.
V means the
speed (from 1 to
15).
So, if you look at
each different room, you can see these OCB Values
:
- Room33 : OCB=207,
which is equivalent to a height of 12 and a speed of 15 ==> 12*16+15=207
- Room37 : OCB=399,
which is equivalent to a height of 24 and a speed of 15 ==> 24*16+15=399
- Room45 : OCB=591,
which is equivalent to a height of 36 and a speed of 15 ==> 36*16+15=591
Then, to activate the
platform, the whole surface must be covered by one or several
triggers. These triggers must be placed on
the ground of the lowest connected room under the platform. In the rooms #33
and #37, the triggers are in the same room as the platform. But, in the rooms
#45 and #46, the platform is in the room above (45) and the triggers in the
room below (46).
To make a
TWOBLOCK_PLATFORM moves up, a there must be a TRIGGER or a HEAVY, but this
trigger can cover a part of the platform
surface. Then, a DUMMY trigger must
complete the rest of the surface. This TT
prevents Lara from falling through the platform.
For example, in the
different rooms, each platform is triggered when Lara press a wall button. So,
under this button, there are 2 TT : a SWITCH for the button and a TRIGGER for
the platform. But, as the platform covers a surface of 2x2 squares, a DUMMY is
placed on the 3 remaining squares. Here are 2 examples of how to trigger a
platform : C1, C2, C3 and C4 represent the 4 squares covered by the surface of
the TWOBLOCK_PLATFORM.
C1
C2
|
DUMMY
for Twoblock_Platform |
DUMMY
for Twoblock_Platform |
|
TRIGGER
for Twoblock_Platform |
C3
C4
C1
C2
|
|
|
|
|
_ _ _ _ _ _ _ TRIGGER
_ _ _ _ _ _ _
for Twoblock_Platform
|
|
|
| |
C3
C4
>> SECOND CASE : floating
platforms
Look at the rooms "Room58"
and "Room59". In this case the
platform never takes Lara up, but simply moves down a little bit when
Lara walks on it. The purpose of this puzzle is to freeze the platform in
order to :
- use it as a bridge
for example. Some pushable objects can then be moved on it.
- allow Lara to reach
a passage that was too high before.
The
OCB value of the patform is set to 0.
But, as it is floating at the begining of the puzzle, it must be 1st activated.
Simply press all the OCB Flags
(1-2-3-4-5) of the platform. Then, place an ANTITRIGGER or an HEAVYANTITRIGGER
in order to freeze it. As for the 1st case, you must cover by
triggers all the surface of the platform.
Back
to top
USING SCALES
Scales can be used
alone or combined with AHMET. Generally, scales work as follows :
- A particular amount
of water is poured in the left pot of the scale.
- If the amount of
water is incorrect, a trap is triggered and kill Lara, or AHMET is released.
- If the amount of
water is correct, another action is triggered, moke the opening of an exiting
door.

Never forget to
build near the puzzle a small water room where Lara can fill up the waterskins.
Objects to add
to your wad :
- WATERSKIN1_EMPTY,
WATERSKIN1_1, WATERSKIN1_2, WATERSKIN1_3 : small waterskin
- WATERSKIN2_EMPTY,
WATERSKIN2_1, WATERSKIN2_2, WATERSKIN2_3, WATERSKIN2_4, WATERSKIN2_5 : large
waterskin
- LARA_WATER_MESH :
animation of Lara for the use of waterskins
- SCALE
- AHMET : ennemy (optional)
>> FIRST CASE : using the SCALE
alone
Look at the room "Room21".
In this example, if Lara pours the right amount of water in the scale, the
door at the opposite wall opens. If she's wrong, spikes are activated. Set up
the scales as follows :
-
Always place the scale between walls, as shown on the following
picture. By this way, there's only one way to reach the
scale and also leave it, forcing Lara to walk on the
trigger for the fatal trap.
- Enter the amount of
water in the
OCB Value of the SCALE (from 1 to
5). This is the number of liters Lara will have to pour in the scale to
trigger the exiting door.
- Place an HEAVY
trigger for the exiting door under the
scale, on the central square.
- On
this same central square, place a "grey box" to prevent AHMET
from walking on it and activating the trigger for the exit.
- Place a KEY
trigger for the SCALE on the 3 squares in
front of the SCALE.
- On these same 3
squares, place as many TRIGGERs for the fatal objects as needed.

in red : location of the
puzzle
en bleu : location of the SCALE.
In the game, you can
notice that even if Lara pours a wrong amount of water in the scale, the
exiting door opens. It means the HEAVY trigger
is always activated. However, in this case only, the fatal traps will prevent
Lara from leaving the room.
>> SECOND CASE : using the SCALE
with AHMET
Look at the rooms "Room40",
"Room42" and "Room43".
This is almost the same as the example shown in the 1st case. The difference
is that the puzzle can be re-initialzed each time a wrong amount of water is
poured in the scale. In this case, Lara won't die and will be able to try
again, but she will have to fight AHMET before. Here's how it works in the
game :
- AHMET is kept in its
cage.
- Lara pours a wrong
amount of water in the scale.
- The cage opens,
releasing AHMET.
- Lara must kill
AHMET.
- AHMET disappear,
goes back in its cage (closed) and the scale is initialzed.
N.B. :
never allow Lara to kill AHMET before the use of the SCALE, or the puzzle
won't work. Of course, if Lara pours the right amount of water, none of these
events will occur, and the scale will never initialize again. It's normal, as
the puzzle has been solved. Follow these instructions to set up the SCALE
puzzle :
- Place AHMET in a
room connected to the puzzle room, and place a door inside this room, not on
the connection between rooms, and with the collision inside the cage. By this
way, AHMET will stay behind the door, and Lara won't be able to shoot at him
through the grid.
- Trigger AHMET in a
room before with a simple TRIGGER. The ennemy will be visible as soon as Lara
enters the puzzle room.
- Enter in the
OCB value of the SCALE the number of
liters to be poured to activate the exiting door.
- Place an HEAVY
trigger for the exiting door under the
scale, on the central square.
- On this same central
square, place a "grey box" to prevent AHMET from walking on it and activating
the trigger for the exit.
- Place a KEY
trigger for the SCALE on the 3 squares in
front of the SCALE.
- In front of the
cage, in the puzzle room, place an HEAVIANTITRIGGER for the door of this cage
and also a simple TRIGGER for the exiting door. This
trigger has 2 purposes : it's AHMET who
will automatically close the doors behind him, once he's released, preventing
Lara from running into the cage and be stuck, or exiting the puzzle room. When
AHMET is killed, he automatically returns in his cage, and the door is already
closed.
There's no need for a
fatal trap in this case, as the scale can be initialized as many times as Lara
fails in pouring water.
Back
to top
USING SEQUENCE_SWITCHES
SEQUENCE_SWITCHES are
3 combined switches that work together. As they are hard coded in the game,
they can't be used alone. The sequence used to press on those big buttons is
very important. There are 6 arrangements : 1/2/3, 1/3/2, 2/1/3, 2/3/1, 3/1/2,
3/2/1. Each sequence triggers the opening of a special door. Therefore,
there must be 6 doors in the level attached to these switches.

Objects to add
to your wad :
- SEQUENCE_SWITCH1 :
1st switch
- SEQUENCE_SWITCH2 :
2nd switch
- SEQUENCE_SWITCH3 :
3rd switch
- SEQUENCE_DOOR1 :
special door attached to the switches. The other door slot don't work with
sequence switches.
- ANIMATING8 :
frame of a switch (must be in animating slot)
How to set up
the sequence switches :
Look at the room "Room26".
Place on 3 squares
side by side, the 3 SEQUENCE_SWITCHES, 3 ANIMATING8 and 3 SWITCH
triggers :
|
Objects
2 clicks
high |
ANIMATING8
SEQUENCE_SWITCH2 |
ANIMATING8
SEQUENCE_SWITCH3 |
ANIMATING8
SEQUENCE_SWITCH1 |
|
Triggers |
SWITCH for SEQUENCE_SWITCH1 |
SWITCH for SEQUENCE_SWITCH2 |
SWITCH for SEQUENCE_SWITCH3 |
Be carefull of the
switches order and select the appropriate switch to set up each trigger.
Don't forget to put each object 2 clicks high.
- Place 6
doors SEQUENCE_DOOR1 wherever you want.
- Change the
OCB value of each door by entering a
number from 0 to 5.
- Press all the
OCB Flags of each door (1-2-3-4-5).
The following array
shows the relation between a switch sequence and the corresponding door :
|
SEQUENCE_SWITCHes |
SEQUENCE_DOOR
triggered by the sequence
Valeur OCB |
|
1-2-3 |
0 |
|
1-3-2 |
1 |
|
2-1-3 |
2 |
|
2-3-1 |
3 |
|
3-1-2 |
4 |
|
3-2-1 |
5 |
For example, when Lara
press switches 2, 1 and 3, the door with the
OCB Value 2 opens.
Important restrictions
:
- The door with the
OCB value 0 must be the first one
to be triggered. So, you must make your level so the sequence 1/2/3 is
the first used.
- All the sequence
switches re-initialize after a door is closed, so that Lara must go to the
newly open passage first. So, inside the passage place an ANTITRIGGER for
SEQUENCE_DOOR1. Don't forget to reopen the door elsewhere with a simple
TRIGGER, so that if Lara uses the same sequence, the switches will re-initialize
immediatly.
Example used in
this tutorial :
Look at the rooms "Room26",
"Room35" and "Room36".
In this tutorial,
there are only 3 visible doors in the room #26. But, as all the doors must be
present in the level, a trick is used to trigger a fatal trap when Lara press
a sequence not allowed. See rooms #35 and #36. They are connected together but
are invisible for the player. Here, the fatal trap is a ROLLINGBALL, blocked
behind the door, which will roll over an HEAVYTRIGGER for a flame, when the
door opens. Watch the different OCB Windows
of the boulders and the doors.
Back
to top
USING ELEMENT_PUZZLE
Look at the room "Room96".
ELEMENT_PUZZLEs are 3
objects similar to scales, which reveive 3 different elements : water, earth
and fire. Each ELEMENT_PUZZLE can be used alone or not to trigger an action.
Never forget :
- to build not too
far a small water room where Lara can fill her waterskins
- to place a
FLAME_EMITTER where Lara can burn her torch.

Objects to add
in your wad :
The following list is
made for the use of the 3 elements. If you don't need to use a particular
element, don't add the corresponding objects.
- ELEMENT_PUZZLE :
scale object
- WATERSKINs : Only
one waterskin is necessary for "water" element (see using
scales for more details).
- PICKUP_ITEM1 : bag
of sand for "earth" element.
- PICKUP_ITEM2 :
jerrycan for "fire" element.
- BURNING_TORCH_ITEM :
to burn the oil. For "Fire" element.
- LARA_WATER_MESH :
animation of Lara for the use of waterskins.
- LARA_DIRT_MESH :
animation of Lara for the use of the bag of sand
- LARA_PETROL_MESH :
animation of Lara for the use of the jerrycan
- TORCH_ANIM :
animation of Lara for the use of the burning torch item.
How to set up :
- Place as many
ELEMENT_PUZZLEs as necessary, wherever you want, and adjust the
OCB value for each of them :
- 0 : the scale
receives "water" element.
- 1 : the scale
receives "fire" element.
- 2 : the scale
receives "earth" element
- Place under each
ELEMENT_PUZZLE a HEAVY trigger for an
object (like a door). Remember the ELEMENT_PUZZLEs can be combined together
for a global action. Simply adjust the
STT Flags of each
trigger in order to complete the TCombi.
This is the example used in this tutorial in the room #96.
How to play with
this puzzle :
To deposit each
element in the scales, you have to open your inventory and select the element.
- For the water
element scale : fill a waterskin, place Lara in front of the scale with
blue waves, and pour the water.
- For the earth
element scale : pick up the bag of sand, place Lara in front of the scale
with a brown triangle, and use the bag.
- For the fire
element scale : pick up the jerrycan, place Lara in front of the scale
with a sun, and pour the oil. Then, pick up the burning torch and burn the oil.
Never save and reload before the use of the torch, or the puzzle won't work.
Back
to top
TRAVELLING
CAMERA
The travelling is made
with FLYBY cameras which follow Lara's moves. During all the sequence,
the player keeps the control of Lara. Look at the rooms "Room90"
and "Room91" for more details.
Generally, proceed as
follows :
- Use a set of several
squares side by side where the flyby sequence is triggered.
- Place at least 2
FLYBY cameras this way : the 1st one should be next to the square where the
sequence starts, and the last one next to the square where the sequence ends.
Try to never place a camera over the trigger. Of course, you can place more
than 2 cameras, but remember that the sequence will play when Lara moves.
- Adjust camera
properties in the OCB Window :

Seq :
sequence number
Num :
camera number
Speed :
leave it to 1
Roll : in
degrees
FOV :
focal length
OCB :
press only flag 3 (the camera follows Lara) and flag 11 (the
player keeps control of Lara)
- Select the squares
set and place a TRIGGER for the first flyby camera. Don't press the "oneshot",
and any STT Flags, because the sequence
must be activated when Lara walks over the trigger.
When Lara leaves the trigger, the sequence
stops automatically.
In this tutorial,
there are only 2 cameras, which is enough. The
trigger is not a TRIGGER but a MONKEY, as it's only when Lara
monkey swing that the sequence is played. If Lara walks on the
trigger in the room below, nothing happens.
Back
to top
HOW TO BUILD YOUR
OWN PERSONNAL SCRIPTS
To build your own
scripts, you'll have to modify 2 files : "SCRIPT.TXT" and "ENGLISH.TXT".
You can change many texts that appear in the game, like :
-
The name of the level
-
The legend shown at the begining of the game
-
The name of the items in the inventory
We will see also how
to :
-
add examine objects
-
add sky with moving clouds
-
add the lens flare effect
-
clear the inventory
Refer to the TRLE
manual, page 63 and 64 for more details.
a.
How to see the results of the script generation
As the generator is a
DOS program, the window closes automatically when the generation is complete,
even if there are some errors. To make the window remain on the screen to let
you see if everything is correct or not, simply add the following line to the
"English Script.bat" file (run "Notepad.exe") :
script script.txt
del ..\*.dat
copy script.dat ..\
copy english.dat ..\
del strings.h
pause
b. How to
change the different texts
- "Name="
line is the name of your level.
- "Legend="
line is a text that appear in the game at the very begining of the level.
- "Puzzle=",
"Pickup=", "Key=" and "Examine="
lines are the names of the different items present in the inventory.
Part of the
"script.txt" file :
...
[Level]
Name= Egyptian dream - tutorial
Legend= Turn OFF the Volumetric FX...
Puzzle= 4,Jewel of Apophis,
$0000,$0400,$0000,$0000,$0000,$0002
Puzzle= 7,Guardian Key, $0009,$0300,$0000,$0000,$0000,$0002
Puzzle= 12,Golden Beetle, $0008,$03b0,$0000,$e000,$0000,$000a
Pickup= 1,Bag of Sand, $0000,$0400,$0000,$2000,$1000,$8002
Pickup= 2,Jerrycan, $0015,$0500,$4000,$f000,$0000,$4002
Examine= 2,The Sphinx's map, $0000,$0500,$0000,$0000,$0000,$0002
...
Note that bold lines
represent new descriptions, which don't exist in the original version of TRLE.
These new texts must also be present in "english.txt". As you can't add or
remove any line in this file, choose texts which will never be used in your
level.
N.B. : if you
want to supply a translated version of your scripts, you'll need to change the
corresponding "txt" file ("french.txt" for example). You will also need to add
a line (see below) in "script.txt" to tell the generator ("French script.bat")
to create the corresponding "dat" file.
;--------------------------------------
; Language Filenames
;--------------------------------------
[Language]
File= 0,ENGLISH.TXT
File= 1,FRENCH.TXT
Here are both "english.txt"
and "french.txt" as they have been modified for this tutorial. You can open
original files to better understand what has been changed.
|
Part of "english.txt"
|
Part of "french.txt" |
|
;**************************************
;
; Tomb Raider IV English Strings File
; Release Version 1.00
;
;**************************************
;--------------------------------------
; Generic Strings
;--------------------------------------
[Strings]
Cambodia, 1984
Turn OFF the Volumetric FX...
Title Load Screen
Egyptian dream - tutorial
The Tomb Of Seth
Burial Chambers
Valley Of The Kings
KV5
Temple Of Karnak
...
|
;**************************************
;
; Tomb Raider IV English Strings File
; Release Version 1.00
;
;**************************************
;--------------------------------------
; Generic Strings
;--------------------------------------
[Strings]
Cambodge, 1984
Mettez les effets volum‚triques sur OFF...
Ecran de chargement
Rˆve ‚gyptien - tutoriel
Le tombeau de Seth
Les chambres s‚pulcrales
La vall‚e des rois
KV5
Le temple de Karnak
...
|
|
...
Armoury Key
The Guards Keys
Scrap Of Paper
Stone of Maat
Stone of Khepri
Stone of Atum
Stone of Re
Jewel of Apophis
Golden Beetle
The Sphinx's map
Black Beetle
Broken Beetle
Broken Glasses
Fire Circle Scroll
...
|
...
Clef de l'armurerie
Clefs des gardes
Bout de papier
Pierre de Maƒt
Pierre de Kh‚pri
Pierre d'Atoum
Pierre de Rƒ
Joyau d'Apophis
Scarab‚e d'or
Les conseils du Sphinx
Scarab‚e noir
Scarab‚e bris‚
Lunettes bris‚es
Parchemin du Cercle de Feu
...
|
Be carefull to never
use any special caracter from other languages. Find the corresponding ones in
the file and make a copy-paste.
Back to top of this paragraph
c. How to add examine objects
These are items Lara
can pickup in the game, and to which a text is attached, in order to help the
player. A map can also be used as an examine object, but with no text. There's
a total of 3 examines that can bu used in a level.
Add objects EXAMINE1
and/or EXAMINE2 and/or EXAMINE3 to your wad. EXAMINE1 is the only one which
can't have any text attached. Then, add the following line in your "script.txt"
file :
[Level]
Name= Egyptian dream - tutorial
Legend= Turn OFF the Volumetric FX...
Horizon= ENABLED
Fog= 152,192,216
Puzzle= 4,Jewel of Apophis,
$0000,$0400,$0000,$0000,$0000,$0002
Puzzle= 7,Guardian Key,
$0009,$0300,$0000,$0000,$0000,$0002
Puzzle= 12,Golden Beetle,
$0008,$03b0,$0000,$e000,$0000,$000a
Pickup= 1,Bag of Sand,
$0000,$0400,$0000,$2000,$1000,$8002
Pickup= 2,Jerrycan,
$0015,$0500,$4000,$f000,$0000,$4002
Examine= 2,The Sphinx's map,
$0000,$0500,$0000,$0000,$0000,$0002
Mirror= 52,$BC00
LoadCamera= 72000,-280,44029,73827,-811,46221,13
Level= DATA\MAGPTUT1,107
The number 2
means it refers to the object EXAMINE2. So, the attached text must be modified
in "english.txt" file and the corresponding trnaslated script files.
Open thoses files and scroll down to this passage :
|
english.txt |
...
Action
Draw Weapon
Jump
Roll
Walk
Look
Duck
Dash
Inventory
RULES1:On the 3rd floor,\ndon't waste your
time.\nTake the following paths\nE
- N/E - N/W - W.
RULES2:On the 2nd visit to the N/E path,\nchoose
these floating slabs\nS/W - N/W - W - S/W - N/W -
N -\n N/E - E - N - N/E - E
PETEPOO:For the serpents to live,\nall must first be stilled.\nprovoke
each in turn,\nand the circle will burn\ncomplete.
...
|
|
french.txt |
...
Action
D‚gainer
Saut
Roulade
Marcher
Scruter
S'accroupir
Sprinter
Inventaire
REGLES (1Šre partie) : Au troisiŠme ‚tage,\nne
gaspillez par votre temps.\nEmpruntez les
chemins suivants :\nE - N/E - N/W - W.
REGLES (2nde partie): A la 2Šme visite du chemin au N/E,\nchoisissez
les dalles flottantes\nS/W - N/W - W - S/W -
N/W - N -\n N/E - E - N - N/E - E
PETEPOO : Pour que les serpents vivent,\ntous doivent\nˆtre calm‚s.
D‚fiez-les chacun … son tour\net le cercle se consumera\ntotalement.
...
|
Caracters "\n"
are separators. They means the following text is placed at the following line
in the game screen.
If you need a smaller
text, use the object EXAMINE3 and modify the description that follows the line
begining with "PETEPOO".
Back to top
of this paragraph
d. How to add a sky with moving clouds
To add a moving sky,
you must have :
- in your wad, an open
HORIZON object. In this tutorial the horizon is closed, and it's impossible to
add such sky with moving clouds. To see an open horizon, open the project
"Karnak.prj".
- in your wad, the SKY_GRAPHICS
object.
- in the same folder
as the wad, a ".raw" file correponding to the image of the sky.
Then, add the
following lines to your "script.txt" file :
...
[Level]
Name= My
level
Horizon= ENABLED
Layer1= 128,96,192,7
Layer2= 128,96,192,-10
ColAddHorizon= ENABLED
Lightning= ENABLED
Puzzle= 1,My item 1,
$0001,$0320,$0000,$0000,$0000,$0002
Puzzle= 2,My item 2,
$0001,$0320,$0000,$0000,$0000,$0002
...
>> "Horizon="
line shows the HORIZON object during the game.
>> "Layer1="
shows the sky during the game. The different values are the
RGB color of the sky, and the speed of the
clouds.
Numbers
128,96,192 change the Red, Green, Blue components of the sky color of the
"raw" image. These values are between 0 and 255 and mean :
- from 0 to 127 ==>
the color component is darker
- equal to 128 ==>
the color component remains the same as in the "raw" image.
- from 129 to 255 ==>
the color component is brighter
Number 7 indicates the
speed of the clouds in the sky :
-negative value ==>
clouds go in one direction. The lower the value is, the quicker the clouds
move (-15 is quick, -5 is slow)
- equal to 0 ==>
clouds don't move
- positive value ==>
clouds go in the opposite direction. The higher the value is, the quicker the
clouds move (5 is slow, 15 is quik)
>> "Layer2="
allows to add another set of clouds in the sky with another color. For example,
it's possible to have clouds that move in one direction and others in the
opposite direction. Optional line.
>> "ColAddHorizon="
adds a junction between horizon and sky. The HORIZON object must have
semi-transparent texture on its top. Look at the wad "coastal" (coastal ruins)
for more details. Optional line.
>> "Lightning="
adds some flash of lightning in the sky with thunder sound.Optional line.
Back to top
of this paragraph
e. How to add the lens flare effect
This effect adds a
kind of light imitating the sun. Add the following line in your "script.txt"
file :
...
[Level]
Name= My
level
Horizon= ENABLED
Layer1= 128,96,192,7
Layer2= 128,96,192,-10
ColAddHorizon= ENABLED
Lightning= ENABLED
LensFlare= 250000,-32000,110000,128,96,0
Puzzle= 1,My item 1,
$0001,$0320,$0000,$0000,$0000,$0002
Puzzle= 2,My item 2,
$0001,$0320,$0000,$0000,$0000,$0002
...
>> The 3 first values
250000,-32000,110000 are the coordinates X;Y;Z of the light. Note the negative
value of Y. A lower value (-40000 for example) will place the light higher.
>> The 3 other
values 128,96,0 are the RGB color of the
light.
To make this effect
rendered in the game, Lara must be in an outside room, with the [O]
from the [Room edit buttons] window pressed. To switch off this effect in one
particular outside room, press the [NL] button.
Back to top of this paragraph
f. How to
clear the inventory
Clearing the inventory
will only remove pickup items, like PUZZLE, EXAMINE, KEY and PICKUP. Medipacks,
weapons and flares can't be removed. This function is only interesting if you
create an adventure with more than 1 level. The inventory is cleared only when
you jump to the next level.
So, add the following
line in your "script.txt" file into the paragraph for the level before the
inventory has to be cleared. In the following example, the inventory is
cleared in level #5, so the line is put into level #4 :
...
[Level]
Name= My
level number 4
Horizon= ENABLED
Layer1= 128,96,192,7
Layer2= 128,96,192,-10
ColAddHorizon= ENABLED
Lightning= ENABLED
ResetHub= 5
LensFlare= 250000,-32000,110000,128,96,0
Puzzle= 1,My item 1,
$0001,$0320,$0000,$0000,$0000,$0002
Puzzle= 2,My item 2,
$0001,$0320,$0000,$0000,$0000,$0002
...
Back to top of this paragraph
|
|