TRNG / NGLE and TombEditor SCRIPTING Tutorials
ELEVATORS
- for beginners -
In my debut level "BtB2024 Challenge of the
Highpriest" I had freedom to use any and every Script command at
my disposal. And based on the reviews I received, the players were very glad to
see some new gameplay, that I achieved solely with the aid of the powerful
Script. Some of those very much liked and commended moments of my debut level
were:
- the Elevator puzzle, where
you can bring the elevator to four floors, and use it to reach various
platforms in the room
- the battle to kill Seth (Seth
is only mortal if the rays of Isis are hitting him and as long as he
doesn't fly)
- the ability to craft poison and
explosive arrows from the Inventory items
- pushable parallel bars, or parallel bars
glued to pushable obelisks
- the Elevator trap, where
plough blades are glued to the elevator floor as we all go upwards
All these gameplay elements were created with the use of the powerful NGLE
/ TombEditor Script. It offers us endless possibilities and
combinations, such as creating brand new puzzles and weapons, enemies and
traps, or sequences of perfectly timed doors, traps, burners, enemies, events,
whatever you want. Trigger Groups, Organizers and Global Triggers can do
miracles if you know how to use them, and they're also not complicated at all.
I've provided several tutorials for NGLE scripting, and I'll continue to do so,
but for the time being, let's focus on the ELEVATOR, my second-favorite Script
command (my favorite and ultimate being the Global Trigger).
Elevators are actually Two_Block Platforms (TBP), which are defined in
the Script as elevators, using the simplest command:
Elevator=
Within this Script command, you define how the elevator should move:
- how many floors?
- how many clicks between each floor?
- the speed of the elevator
- the animated objects that move with the
elevator
- are there doors and keypads to operate
the elevator internally?
- are there doors and keypads to operate
the elevator externally?
Within the
WAD, you need to have the following objects:
- TWO_BLOCK_PLATFORM or ONE_BLOCK_PLATFORM
object
- all other objects which should be moved
with the Elevator in Animating slots!
- Keypad in Switch_type 1 slot
(if you use it for external operation)
- Door in Door_type slot (if you use it,
double or single)
- False keypad in Animating 1 slot
(if you use it for internal operation)
When you
define the TBP as an Elevator in the Script, you will automatically get
the following features:
- the Elevator has "two
floors" 8 clicks apart. This means that the elevator ceiling will
be 8 clicks above the elevator floor.
- Lara can stand on both
floors and also ride the elevator inside (on the elevator
floor) or above the elevator (on the elevator ceiling).
- Lara can also hang from the edges of
the elevator floor and elevator ceiling, but don't try to pull up while
the elevator is moving upward or downward, as the results could be quite
strange
- the Elevator can be used as a
trap as well. If Lara is standing at the bottom of the elevator
shaft, the elevator can kill her as it goes to the ground floor. If Lara
is standing on the elevator roof as it goes up, she can die when the
elevator reach the top floor, if the shaft ceiling is low.
In my
BtB2024 level, the setup was the following:
- TBP set to "invisible" in the
OCB window
- Dummy trigger set beneath the TBP in the
room (elevator shaft)
- Elevator created in the Script, and
various animated objects added to it, which should go up/down with the TBP
- Placing four switches that bring the
elevator to the desired floor (4 floors in total)
This is the
BASIC setup for an Elevator, perfect for this tutorial. More complex elevators
can be created as well, with bridges, keypads, doors, collisions etc., but this
is a tutorial for beginners, and we'll focus on the basics here. As example,
I'll use the Horus Elevator puzzle from my debut level "BtB2024
Challenge of the Highpriest".
The basic
concept of an elevator is: you create the elevator from a TBP, and then you
define the number of floors, the clicks between the floors and speed of the
elevator. After that, you add the animated objects that you
want to be moved with the TBP (elevator).
So, place
the TBP in the elevator shaft and note its ID number. In our example,
it's 84. The elevation of the TBP in the Editor is
always the first floor. You can lower the floor of the
elevator shaft if you want and create a basement, it won't change the elevation
of the TBP and the first floor.
Elevator=
[ID of the TBP], [clicks between floors], [number of floors]...
In our
case:
Elevator=
84, 8, 4...
Two-block
platform 84 will work as elevator with 4 floors and 8 clicks between each
floor.
Elevator=
[ID of the TBP], [clicks between floors], [number of floors], [elevator
features], [elevator door], [elevator keypad], [speed], [...objects attached to
the elevator...]
For our
setup, we don't need a keypad inside the elevator, and we don't need an
elevator door. So, after the number of floors, we write "IGNORE"
three times, and then define the other parameters:
Elevator=
84, 8, 4, IGNORE, IGNORE, IGNORE, 16... (the speed is added, which is
16)
Now, you
simply add other Animated objects in the Editor and note
their ID numbers. You simply add these numbers to the Elevator= line in the
Script, separated by a comma. In my level, I added 30 objects to
this elevator, such as 4 bridges, 12 golden platforms, burners, curtains, wall
brackets... But for the purpose of this tutorial, you simply make a 2x2
elevator shaft, and place one Dummy trigger for the TBP at the bottom of the
shaft, by selecting the 2x2 area beneath the TBP. If you made your TBP
invisible in the OCB window, then you have to add an Animating or MIP object
that will imitate the elevator floor and ceiling, or several such objects. Just
add their ID numbers to the Elevator= line in your Script after the speed
parameter, and they'll simulate the elevator for you.
So, after
the speed (in our example "16"), add the ID numbers of
animated objects that will move with the visible or invisible two-block
platform. You can now build your Script. The remaining work is to be done
in the Editor, or elevator room itself.
In our
example (Challenge of the Highpriest) we have an elevator that is sent
to the desired floor by four different wall levers. Switch 1 sends the
elevator to floor 1, Switch 2 sends it to floor 2, etc.
Place the
switch you want to use for sending the Elevator to floor 1. Place a Switch
trigger beneath that switch, as usual. Now, select the TBP in the room and the
same floor square beneath the switch, and click on "+" in the
Trigger section of the Editor to open the Trigger Editor window. In this
window, place an ActionNG trigger for the Elevator on the same
square beneath the switch.
Click
"OK" to place the trigger, and then repeat the same process with
other three switches, assigning the respective floor to each of the switches.
You can now build the level and test your elevator.
ADDITIONAL
NOTE: The sounds for the elevator are hard-coded. The Script
always uses samples/slots 370 and 371 for the Elevator (370
for moving, 371 for stopping). If your elevator is silent, it's because you're
missing the sounds/samples on these two slots. If you hear strange and
inadequate sounds when you move your elevator in-game, then replace these two
samples (370 and 371) with sounds that will fit better with your elevator.
Happy
building!
No comments:
Post a Comment