SMBX Custom Inventory System (1.0)

Share and discuss custom LunaLua code and content packs for SMBX2.

Moderator: Userbase Moderators

deice
Volcano Lotus
Volcano Lotus
Posts: 596
Joined: Fri Jul 23, 2021 7:35 am

Re: SMBX Custom Inventory System (1.0)

Postby deice » Thu Apr 28, 2022 5:07 am

LawrenceindaSky wrote:
Thu Apr 28, 2022 1:26 am
I am super new still to Lua related stuff on SMBX2, how would I call the script? I've tried to 'Edit raw user data' and tried putting adding the item but I am certain I need something like "if interacted = do this" but I am unsure how it all works out.
Thank you so much in advance!
as the original post details, create two files inside your episode folder called "map.lua" and "luna.lua". open them inside a text editor and add

Code: Select all

local inventory = require("customInventory")
at the top of each file. the main post then also outlines how to add and set items. if you're unsure about where inside the code you'd put those calls, i recommend reading this, this and (albeit a slightly outdated source) this.

RadMetalMarioSMIX
Swooper
Swooper
Posts: 65
Joined: Sat Mar 14, 2015 6:42 pm
Flair: What kind of grave is this?
Pronouns: he/him

Re: SMBX Custom Inventory System (1.0)

Postby RadMetalMarioSMIX » Thu Apr 28, 2022 12:07 pm

LawrenceindaSky wrote:
Thu Apr 28, 2022 1:26 am
I am super new still to Lua related stuff on SMBX2, how would I call the script? I've tried to 'Edit raw user data' and tried putting adding the item but I am certain I need something like "if interacted = do this" but I am unsure how it all works out.
Thank you so much in advance!
Inside your main episode folder put this above everything else in the Luna.lua:

Code: Select all

 local inventory = require("customInventory")
Added in 2 minutes 2 seconds:
deice wrote:
Thu Apr 28, 2022 5:07 am
LawrenceindaSky wrote:
Thu Apr 28, 2022 1:26 am
I am super new still to Lua related stuff on SMBX2, how would I call the script? I've tried to 'Edit raw user data' and tried putting adding the item but I am certain I need something like "if interacted = do this" but I am unsure how it all works out.
Thank you so much in advance!
as the original post details, create two files inside your episode folder called "map.lua" and "luna.lua". open them inside a text editor and add

Code: Select all

local inventory = require("customInventory")
at the top of each file. the main post then also outlines how to add and set items. if you're unsure about where inside the code you'd put those calls, i recommend reading this, this and (albeit a slightly outdated source) this.
Actually listen to this dude he explains it better. Also, thanks for xmap dude, makes creating my episodes easier!


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 5 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari