Organizer Tutorial - Tomb-Raider-Level-Editor/Tutorials GitHub Wiki

Written by Nina Croft

What is Organizer in NGLE?

It is a powerful command that creates a precise sequence of events. In Organizers you define when exactly you want something to be triggered in game. It's something the level builders call a trigger from the Script, or Script trigger. For instance, you want to place 25 teethspikes and trigger each of them precisely at the time you want them to pop out or retract. To create this sequence of events, you will trigger all 25 teeth spikes from the Script, within one Organizer command. In the Editor, you'll place one trigger only, the trigger that triggers the Organizer itself. Imagine triggering 25 teethspikes precisely at a moment you want, with placing one single trigger in the Editor That's what Organizer does for you.

Imagine the following trap: 25 spikes, placed on every square on a 5x5 field in the Editor. Now, some spikes (group 1) are permanently out, and deadly at the same time. If Lara touches them, she dies. Some other spikes (group 2) pop out and retract at a certain cycle. For instance, they are out for 2 seconds, and then retracted for 10 seconds. This makes it possible for Lara to cross to the other side of the spike field, when these retracted spikes create a safe path for Lara during these 10 seconds. Basically, we have two main groups of spikes, but in the Script, we'll have four Trigger Groups:

  • TriggerGroup 1 is when the 14 spikes are triggered (out)
  • TriggerGroup 2 is when the other 11 spikes are triggered (out)
  • TriggerGroup 3 is when the 14 spikes are antitriggered (retracted)
  • TriggerGroup 4 is when the other 11 spikes are antitriggered (retracted)

We trigger and antitrigger Group 1 (14 deadly spikes) and Group 2 (11 safe path spikes), therefore 4 Trigger Groups, two for triggering and two for antitriggering.

We must now populate our Trigger Groups. It is actually much easier once you understand the TriggerGroup command in the Script A trigger group can have one member, or more members (I think maximum of 32 members). We need to export the correct trigger from the Editor into the Script for every teethspikes item you place on the spike field. It's easier than it sounds. It's actually sufficient to export only the first trigger from the Editor, and then to note just the ID numbers of all the other spikes. This is a step-by-step guide how to do that.

For now, let's place the first teethspikes on the first square. All spikes in this example must have OCB 20 (pop out of the floor). Then we must select the Teethspikes and then a square in the Editor 3D map (any square). Then go to the lower left corner of the Editor and find a plus sign in the Trigger window (to add a new trigger). In the Trigger Editor window, in the What field, select ActionNG. Then in the Timer field select Trigger (Moveable) Activate object (A43). DO NOT click OK and don't add a trigger to a square in your room! We don't want to add a trigger for these spikes in the Editor (room), but in the Script. Therefore, we must export trigger command for the Script, in the lower right corner of the window. You'll see something like $5000,220,$002B. This is a three-part parameter, and the middle part (220) is the ID code of the spikes. The third part of the code is TRIGGER ($002B for spikes). Copy this entire code (use the shortcut buttons to the right of the Script line with codes), and go to the Script.

Screenshot-2

In the Script, create a new Trigger Group. In this example, it's TriggerGroup 20

TriggerGroup= 20, [paste the code] in this example: TriggerGroup= 20, $5000,220,02B In other words, we commanded the spikes in the room with ID 220 to pop out ($002B)

Now we must add all the other spikes that belong to the first group of spikes (always triggered). Go to the Editor and place the remaining 13 spikes on the sectors where Lara cannot go. You don't have to export anything, just note the ID codes for all these spikes (write them down, for instance). In my example, we have spikes with ID codes 221-233). Once we have these IDs, we can go to the Script and populate our TriggerGroup 20.

Simply paste the previously exported trigger for 13 more times, and carefully change the ID number of each entry. In other words, fourteen Teethspikes with these ID numbers will be triggered ($002B) at the same time in this Trigger Group.

Screenshot-3

Now we must create a trigger group that will tell these 14 spikes to deactivate when we need them deactivated. You don't have to do anything in the Editor. Simply copy the previous command line (Trigger Group 20 entirely, until the end) and paste it in the segment below in the Script. Now, change the number of the trigger group. In this example:

TriggerGroup= 21, [the code for 14 spikes to activate]

Now, change all $002B entries in this group to $002C entries. This $002C command will tell these 14 teethspikes to retract when you want.

Screenshot-4

When you have both trigger groups ready (Group 1 ON and Group 1 OFF), it's time to create the other group, which in this example contains 11 teethspikes. Go to the Editor and place all 11 remaining spikes along the safe spike fields, where Lara should run. Don't export anything, just note the ID numbers, and the commands you already have in the Script. Remember, OCB for each teethspikes item must be 20 in this example.

Create TriggerGroup= 22, and then add the commands $002B for 11 teethspikes - ON After that, create TriggerGroup= 23 and then add the commands $002C for 11 teethspikes - OFF

Once you have this, there's one more thing to add to these trigger groups. When you trigger Teethspikes in the room, they will have a sound when they pop out and when they retract. But, when you trigger them from the Script, they will most probably be silent and won't be heard in game. To force their sound, just export the correct command from the Editor into the Script, and add it to each TriggerGroup where you trigger the teethspikes.

To export the „play this sound“ command from the Editor into the Script, we again need a Flipeffect. Select any sector in the Editor (room) and go to Add new Trigger. In the What field select FlipEffect. In Param. field find SOUND Play Sound (single playback), which is F168. In Timer field enter the ID of the sound. For teeth spikes, it's slot 343. You can replace the sample, but the slot 343 is hard-coded for Teeth spikes. Check in SoundTool in .sfx file the slot of the desired sound.

Again, don't click OK and don't add this trigger to the square in the room. Export the code for the Script as you did earlier for Teethspikes. In the Script, add this code to the end of every trigger group (separate all entries by a comma, of course).

Screenshot-5

And now, let's go to the Organizer. As I explained above, Organizers define the sequence of events. We have four events here, and we must now make their plan, or schedule of the events.

  • Event 1 is TriggerGroup 20, with 14 spikes ON
  • Event 2 is TriggerGroup 21, with 14 spikes OFF
  • Event 3 is TriggerGroup 22, with 11 spikes ON
  • Event 4 is TriggerGroup 23, with 11 spikes OFF

First to define the Organizer. In this example, the Organizer will have number 5.

Organizer= 5, FO_LOOP, IGNORE,

So, first the Organizer number, then Organizer Flag LOOP (we need it here), and then one IGNORE part (unused). After this, we start the sequence. The structure of the Organizer command that describes the sequence of events is:

--- after this number of seconds since the Organizer is triggered, execute Trigger Group number, after this number of seconds, execute Trigger Group number etc ---

Now we make a sequence of four events (trigger groups):

2 seconds after Organizer is triggered TG 20 is triggered (14 spikes ON). At the same moment (0 seconds), TG 22 is triggered (11 spikes ON). --- In game, all 25 spikes pop out at the same time, 2 seconds after Organizer is triggered from the room. We write:

Organizer= 5, FO_LOOP, IGNORE, 2, 20, 0, 22

2 seconds later, TG 23 is triggered (14 spikes OFF) --- In game, Lara can run across the safe fields 10 seconds later, TG 22 is again triggered (14 spikes ON) --- Lara has 10 seconds to get to safety

Therefore, we add the following to the Script command:

Organizer= 5, FO_LOOP, IGNORE, 2, 20, 0, 22, 2, 23, 10, 22

We have to do one more little thing with this sequence, to make a nice loop (the sequence will repeat until Organizer is untriggered or until the level ends). Now we have all spikes ON again, and we will retract all 25 spikes for two seconds, before the first step can start again (loop). To do this, we must execute TG 21 and TG 23 simultaneously, two seconds later. We add first 2, then 21, then 0 (seconds), then 22, and our Organizer is complete and ready to be added to the room in the Editor:

Organizer= 5, FO_LOOP, IGNORE, 2, 20, 0, 22, 2, 23, 10, 22, 2, 21, 0, 23

In the Editor, select the square where you want to trigger the sequence (Organizer). Then go to Add new Trigger and open Trigger Editor window. Therein, on What line select FlipEffect. On Param. line select ORGANIZER Enable Organizer. Finally, in Extra line, select the number of the Organizer. In this example, it's Organizer 5. Make sure to tick the One-shot field, as we want to start this sequence only once. This time click OK to place the trigger in the room. That's the only thing that is actually triggered from the room. With this one trigger we actually call the Script, and the Script then executes all the triggers from the Trigger Groups in the order you defined.

Screenshot-6

In this particular example, I will also show you how to make these spikes absolutely deadly for Lara. If you do nothing about these spikes, by default, they won't be deadly. Or in other words, if Lara touches them or runs through them, she won't die instantly. She'll only lose health until she dies, or until she's on a safe square. To make Teethspikes deadly upon touching, we have to use one-line command in the Script. This will define ALL Teethspikes on this particular level deadly on touch. You can try this command and see the difference:

Enemy= TEETH_SPIKES, IGNORE, IGNORE, IGNORE, 1000, IGNORE, IGNORE

With this line in the Script, all Teethspikes in this level will reduce Lara's Health by 1000 units (in other words, kill her immediately).

This trap with spike field and a safe path is hereby complete and ready to be tested. Don't forget to save and build your Script. If you made a mistake, carefully check the entries in TriggerGroups, and the sequence of events in the Organizer. One little correction when necessary, and everything is back on tracks!

Organizers and Trigger Groups are very powerful tools and commands in the Script which can help you make wonders with the gameplay. You can create with them sequences of traps, open or close the doors, raise or drop the trapdoors, activate and deactivate burners and traps, and all kinds of stuff, in as many combinations as you want. The Script allows for 400+ Organizers per single level! And this also massively reduces the triggers you actually add to the room. In this way you have many sectors in a room which are free for other special triggers. Imagine the headache you'd have if you had to place 25 triggers for 25 spikes in one room, without Trigger Groups and Organizers!

This tutorial is also presented in a video, for those who want to see how this works in game. Feel free to ask for a tutorial you want me to make in the future! Have fun with Organizers!

https://www.youtube.com/watch?v=fx7caiKBtlg