Modpacks in T-Bar Engine offer the ability to add global scripts, just like Codename Engine. A global script is a script that run throughout all states until it's associated modpack is closed.
It does this by applying callbacks to `FlxG.signals`.
Let's create one for our modpack! To start, go into the `states` folder of your T-Bar Engine modpack and add a script called `Global.hx` in the root of the folder.
Note: On versions under 2.0, the script has to be named `Global.hx`, while on version 2.0, it's not cap-sensitive, so you can name it `global.hx`.
Keep in mind that only ONE global script is allowed to be active at a time, and it's usually the upmost important modpack (or the root mods folder)
Also, it's a good idea to make your modpack reset the game when you activate/deactivate it
This is because it's usually best if the global script starts right when the engine has started instead of starting from the mods menu.
(Please note that it's a good idea to disable Global Scripts in the fork's Project.xml for source code projects)