How do I put other NPCs on Line Guides?

Need help with any SMBX game-related issues? Ask your questions here.

Moderator: Userbase Moderators

Deltom
Spiny
Spiny
Posts: 27
Joined: Tue Jun 28, 2022 10:59 am
Flair: also known as "mawio" :3
Pronouns: she/her
Contact:

How do I put other NPCs on Line Guides?

Postby Deltom » Tue Jun 28, 2022 11:04 am

I wanted to give my level a bit of a Super Mario Maker feel, and I feel Line Guides would be perfect for that. The problem is, I can't put enemies, coins or other NPCs on them. When I test them in-game, they just fall and don't stick to the Line Guides.

deice
Rocky Wrench
Rocky Wrench
Posts: 638
Joined: Fri Jul 23, 2021 7:35 am

Re: How do I put other NPCs on Line Guides?

Postby deice » Tue Jun 28, 2022 12:43 pm

placing arbitrary npcs on line guides is not possible in vanilla smbx. you can use the following lua code (make a file called "luna.lua" inside your level folder and place the code in there) to change the properties of given npcs and make them follow line guides:

Code: Select all

local lineguide = require("lineguide")

local npcList = { 1, 2 } -- insert the ids of the npcs you want to put on line guides here

lineguide.registerNpcs(npcList)
for instance, this code makes the brown and red smb3 goombas follow line guides when placed on them.
do note however that this is a pretty hacky solution and will invariably cause issues with some npcs for which this behavior is not normally intended.

Deltom
Spiny
Spiny
Posts: 27
Joined: Tue Jun 28, 2022 10:59 am
Flair: also known as "mawio" :3
Pronouns: she/her
Contact:

Re: How do I put other NPCs on Line Guides?

Postby Deltom » Tue Jun 28, 2022 1:26 pm

deice wrote:
Tue Jun 28, 2022 12:43 pm
placing arbitrary npcs on line guides is not possible in vanilla smbx. you can use the following lua code (make a file called "luna.lua" inside your level folder and place the code in there) to change the properties of given npcs and make them follow line guides:

Code: Select all

local lineguide = require("lineguide")

local npcList = { 1, 2 } -- insert the ids of the npcs you want to put on line guides here

lineguide.registerNpcs(npcList)
for instance, this code makes the brown and red smb3 goombas follow line guides when placed on them.
do note however that this is a pretty hacky solution and will invariably cause issues with some npcs for which this behavior is not normally intended.
Thanks a lot, man!
I'll try this out in a bit


Return to “Help and Support”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari