inLevelPathing.lua v1.0 - does what it says on the tin

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

Moderator: Userbase Moderators

KBM-Quine
2025 Egg Hunter
2025 Egg Hunter
Posts: 140
Joined: Wed Jan 15, 2014 11:10 am
Flair: Crazy with a K

inLevelPathing.lua v1.0 - does what it says on the tin

Postby KBM-Quine » Wed Jun 04, 2025 10:44 am

a very simple library that does pathing work in levels when invoked. made as i needed it for a DA2 cutscene.
gif: show
Image
basic use: show
- place the library in the base of your episode or level folder. you can place it elsewhere if you know what your doing, but this guide assumes your unfamiliar with this process.
- make a luna.lua file in the base of your episode or level folder. this is most easily done by making a new text document and renaming it to luna.lua (assuming you have show file extensions on. here's a guide on that for each windows version if you do not.) you can also use a text editor of choice to make one. select "All Files (".")" as the type and put .lua at the end of the filename when saving. make sure the file is luna.lua and not luna.lua.txt! you can skip this step if you already have a luna.lua file.
- place this code in your luna.lua file and save:

Code: Select all

local iLP = require("inLevelPathing")
- call this when you want to show a path:

Code: Select all

iLP.showIntersecting(x1, y1, x2, y2)
x1 & y1 are the top left of the area to affect. and x2 & y2 are the bottom right. these use overworld coordinates, not level coordinates. you can get those through the editor by:
- holding control while placing an object
- using the to map X/Y menu
- right click > copy preferences > position
for those still confused, here's a diagram using the example code i wrote as a base:
Image
read the documentation spoiler for other information.
documentation: show
iLP.hideIntersecting(x1, y1, x2, y2)
same as showIntersecting, but hides objects.

iLP.teleportOverworldPlayer(x, y)
changes the overworld players X & Y coordinates. useful if you don't want to use warps to do so.
i don't know if this works in intros/if the overworld has not been loaded atleast once during a play session. so be warned

feel free to give any feedback or report bugs, have a nice day.
Image

Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari