Cutscene

most relevant files:
[scene.lua](https://github.com/NimbusBP1729/hawkthorne-journey/blob/3f73ddf4cbaf48e95a560151bec92736c92d612f/src/nodes/scene.lua): the base class
[gilbert_entrance.lua](https://github.com/NimbusBP1729/hawkthorne-journey/blob/3f73ddf4cbaf48e95a560151bec92736c92d612f/src/nodes/cutscenes/gilbert_entrance.lua): an example script

To create a new cutscene make a new file in the `cutscenes/` folder

Assign it to a level with a node and use the following picture to determine the fields
![](http://i.imgur.com/1j8R9ow.png)

Add all referenced cutscene nodes in the tmx file as follows:

![](http://i.imgur.com/kcZJFSU.png)

The script file works by looping through a table of the following:
call the `preconditions()`, execute the `line`, and call `action()` function.

All the code in action() is run practically at once as is all the code in precondition(), so to make different actions i usually make a new dialog line.