Leveltimer.lua

*Obsoleted by "Timer" class and Builtin Timer Level Setting in SMBX2B4+

The latest release can be found here. The source code can be found here.

Installation
After downloading the .zip, place the contents of the zip (save for usage.txt) into your LuaScriptsLib directory. Inside of your LuaScriptsLib folder, you should now have a leveltimer folder and leveltimer.lua.

How to Use
The script is meant to be used on a per level basis, just like each level in Super Mario World has its own time limit. However, it CAN be used on a global basis if placed in a lunaworld.lua.

In your lunadll.lua file, start with the following import:

Then, override the onStart function of the level and set your variables.

This sets the amount of time in your level, 300, and sets the timer to be enabled.

Media
YouTube Video