How do I make a block that lacks collision within the editor in SMBX 2.0?

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

Moderator: Userbase Moderators

TrashNomad64
Goomba
Goomba
Posts: 2
Joined: Thu Dec 12, 2019 10:02 pm

How do I make a block that lacks collision within the editor in SMBX 2.0?

Postby TrashNomad64 » Thu Dec 12, 2019 10:17 pm

I'm making a level and I need to make certain blocks have zero collision but I simply don't know how.

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9890
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: How do I make a block that lacks collision within the editor in SMBX 2.0?

Postby Emral » Fri Dec 13, 2019 1:02 am

To make a block that only lacks collision if you're playing in the editor, you can do the following check in your luna.lua file:
if Misc.inEditor() then
Block.config[BLOCK_ID].passthrough = true
end

You have to replace BLOCK_ID with the numeric ID of the block which you want to be nonsolid.

Alternative interpretations:
"A block that doesn't collide with other objects in the editor" -> Just cut-pasting blocks around is honestly an easier solution.
"Editing a block's collision through the editor" -> Not possible. Set the passthrough flag like above in your level luna.lua file. If you want it to be nonsolid even when not playing in the editor, just omit the conditional. In the future, you will be able to use block-n.txt files to set the passthrough flag instead, but not yet.

Cedur
Link
Link
Posts: 7073
Joined: Tue Jun 28, 2016 10:14 am
Flair: I'm gone, for chess and minesweeper
Pronouns: he/him

Re: How do I make a block that lacks collision within the editor in SMBX 2.0?

Postby Cedur » Fri Dec 13, 2019 9:51 am

couldn't you just replace some bgo graphic?

TrashNomad64
Goomba
Goomba
Posts: 2
Joined: Thu Dec 12, 2019 10:02 pm

Re: How do I make a block that lacks collision within the editor in SMBX 2.0?

Postby TrashNomad64 » Fri Dec 13, 2019 8:09 pm

Cedur wrote:
Fri Dec 13, 2019 9:51 am
couldn't you just replace some bgo graphic?
I could and I believe that is what I'll do for the time being, thank you.

Added in 12 minutes 52 seconds:
Thank you both Enji and Cedur for giving me suggestions on what to do


Return to “Help and Support”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari