deathTracker.lua

From Moondust Wiki
Jump to navigation Jump to search
This is the archived page of the old LunaLua documentation
The rest of LunaLua related articles in this wiki contain a lot of outdated documentation preserved for historical purposes and may be used with legacy versions of the LunaLua.
Please visit the SMBX2 Documentation Page to access the latest documentation for the LunaLua scripting system of the SMBX2 Project.
Adding LunaLua contents into this Wiki is not advised.

Download Latest Version

deathTracker.lua visually keeps track of your deaths in a level and their position. It requires LunaLua v.0.7 I think dunno.

Installation

Extract the zip into the LuaScriptsLib folder.

How to use and Examples

To enable deathTracker, add this line to lunadll.lua, or lunaworld.lua:

local deathTracker = API.load("deathTracker");

Image files

DeathTracker allows you to customise your death icon. It comes with some pre-installed images:

Variable Description
deathTracker.ICON_STANDARD A Super Mario Maker-style icon.
deathTracker.ICON_STANDARD2X A Super Mario Maker-style icon. Rescaled to fit SMBX's sprite detail. This image is used by default.
deathTracker.ICON_ARROW An arrow icon.
deathTracker.ICON_ARROW2X An arrow icon. Rescaled to fit SMBX's sprite detail.
deathTracker.ICON_PLAYER1 Mario's death effect.
deathTracker.ICON_PLAYER2 Luigi's death effect.
deathTracker.ICON_PLAYER3 Peach's death effect.
deathTracker.ICON_PLAYER4 Toad's death effect.
deathTracker.ICON_PLAYER5 Link's death effect.
deathTracker.ICON_TRUMP Making SMBX great again!
deathTracker.ICON_SWEAT Sweat smile emoticon.
deathTracker.ICON_CAT :3

Examples

deathTracker.iconSprite = deathTracker.ICON_STANDARD
deathTracker.iconSprite = Graphics.loadImage("example.png")