Event Sequence Tutorial : Basics

Last Updated: 25 February 2026

Introduction #

In this tutorial: I will walk you through how to trigger events to happen in succession. This is the TombEngine equivalent of TRNG Organisers. This tutorial will cover the basic steps required to trigger such events and will hopefully leave you open to experiment further.

The sections to complete are as follows:

  1. Create the events that you want to trigger inside the Node Editor of Tomb Editor,
  2. Create an Event Set,
  3. Trigger it in-game.

Tomb Editor Setup. #

In this first section, we will create the setup used for this tutorial. This section assumes you have basic knowledge of how to use Tomb Editor.

  • The textures we will be using are by Delca: https://www.trsearch.org/item/5569
  • The project will use the base TombEngine WAD2 that comes with Tomb Editor.
  • I have also provided some further assets taken from Tomb Raider I (download the tutorial files – see top of page).

In your project file, I have created a simple few rooms where I have placed three doors that will open and close, in sequence, one after the other. The aim is for the player to pick the right path.

To give an object a unique Lua name: right-click the object and select “rename object”. Please do this for all three doors and give them the names “door1”, “door2”, and “door3”.

Exporting Nodes into TombIDE Script Editor #

The next step is where we will begin scripting within TombIDE . You can use any coding program you like (I use Visual Studio). Please open your application of choice and open the level script file ( located in Engine\Scripts\Levels) so it is ready to edit a bit later.

First, you can start off in the node editor in Tomb Editor and create a node like the example below. 

Afterwards: we are going to export this out to the clipboard. The result will look like this:

LevelFuncs.ExportedNodeFunction = function(activator)
	LevelFuncs.Engine.Node.EnableMoveable("door1")
end

However: this will get confusing as we stacking many of these exported nodes out together. Therefore I have amended then name to:

LevelFuncs.Door1Open = function()
	LevelFuncs.Engine.Node.EnableMoveable("door1")
end

This is important to do as each action needs to be contained inside a function in order to work and as they all have the same name: this will not run.

The easy thing about this as, as we have named our objects in Tomb Editor: you can edit the code easily to produce an open and close event for each door.

Notice how I have just changed the number of each door for each line. Use this code in the level script lua file we opened earlier.

-- Door Open
LevelFuncs.Door1Open = function()
    LevelFuncs.Engine.Node.EnableMoveable("door1")
end


LevelFuncs.Door2Open = function()
    LevelFuncs.Engine.Node.EnableMoveable("door2")
end


LevelFuncs.Door3Open = function()
    LevelFuncs.Engine.Node.EnableMoveable("door3")
end

-- Door Close
LevelFuncs.Door1Close = function()
    LevelFuncs.Engine.Node.DisableMoveable("door1")
end


LevelFuncs.Door2Close = function()
    LevelFuncs.Engine.Node.DisableMoveable("door2")
end


LevelFuncs.Door3Close = function()
    LevelFuncs.Engine.Node.DisableMoveable("door3")
end

Creating the Event Sequence #

Now we have all the events we want to happen in our sequence: it’s now time to put them all together and see our work in game.

In the level lua file, underneath the code we added above, create a new function:

 local doorTime = 2.0 -- how many seconds each door is open for (used below)

local doorOpening = EventSequence.Create
    (
    "DoorSequence", -- Lua name for event sequence as a whole. 
    true, -- If sequence loops then true, if not: false.
    false, -- We will not show the in-game timer for this example.


    -- The below section is where you put all the events you want
    -- in your sequence, in the order you want them,
    -- with the timings between)

    doorTime, -- I made an enumerator for this so I don't have to change all manually.
               -- Alternatively, instead of "doorTime" put the number of seconds.
    LevelFuncs.Door1Open,
    doorTime,
    LevelFuncs.Door1Close,
    doorTime,
    LevelFuncs.Door2Open,
    doorTime,
    LevelFuncs.Door2Close,
    doorTime,
    LevelFuncs.Door3Open,
    doorTime,
    LevelFuncs.Door3Close
    )

   -- last : now we have created the Event Sequence: you must Start it:
    doorOpening:Start()
end

An important note: an event sequence will not work unless a time is given between each action. In the code above, doorTime does this (lines 17,19,21,23,25). You can instead put the number of seconds there.

We’re almost ready, but the script won’t yet work as we need to call an underlying script (contained in a separate file that comes with Tomb Engine). Add this line at the top of the whole level lua script file. You only need this once in the script for that level even if you have lots of event sequences.

 local EventSequence = require("Engine.EventSequence")

Please ensure you SAVE your file before the next step.

Setting up in Tomb Editor #

Next: lets complete the final section and set up Tomb Editor to run this script. There are a few methods for this. For this first example, we will be using a volume.

1) In 3D mode: select a row of sectors press the V key to create a new volume and open the Event Sets editor. 

2) Create a new event set and make sure it is set to “On Enter” (top right)

3) Right-click the main window, and a box will pop up with various nodes. Navigate to the “Run Script Function” found in the Gameflow section:

4) In the drop down box: you should see a list of functions that are inside your script file. If you do not: then either your functions are not in the proper format as shown above, or you have not saved your file. If you have saved and you aren’t seeing them then please close the node editor, save your script again and re-open.

5) You must select the sequence that contains your Event. In this example: I have named the function as “DoorSequence” . This is why naming is so important. 

6) Press “OK” and the volume you created will have this event assigned to it.

7) Build your level and view in-game.

Conclusion #

To summarise: we have created a custom sequence (known as an Event Sequence) , completed all scripting for it and ran it in-game. This tutorial only scratches the surface of what is possible. The second part of this tutorial (coming soon) will show more examples and add in some conditions of the sequence to play out.

If you have any feedback or require further help: please reach out on our dedicated Discord server.