smb3goalcard.lua
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. |
The latest release can be found here. The source code can be found here.
Installation
Copy/paste the smb3goalcard.lua file and smb3goalcard folder in the same directory as your .wld file along with a lunaworld.lua, as it is intended to be used throughout an entire episode.
How to Use
In your lunaworld.lua file, start with the following import:
smb3card = API.load("smb3goalcard");
Then, override the onStart function of the level and set your variables.
function onStart()
smb3card.usesCard(true);
end
This enables all of your levels that have the SMB3 Roulette exit to use the module.
If you wish to disable the roulette for a specific level for any reason, make a lunadll.lua file in the corresponding levels graphic folder, and add the following.
smb3card = API.load("smb3goalcard");
function onStart()
smb3card.usesCard(false);
end
This will disable the ability to get a card from the roulette.
Methods Reference
| Name | Returns | Notes |
|---|---|---|
| usesCard() | bool | Enables/Disables the GetCard functions. |