Need a list of ALL custom block settings

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

Animebryan
Spike
Spike
Posts: 262
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Contact:

Need a list of ALL custom block settings

Postby Animebryan » Sun Jan 17, 2021 1:50 pm

I need a complete list of ALL custom block settings for the block.lua file. I'm trying to make a custom Muncher block but for some reason it defaults to being Invisible, Slippery & containing a coin. I need to remove those defaults & set it to cause damage on contact.

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

Re: Need a list of ALL custom block settings

Postby Emral » Sun Jan 17, 2021 1:52 pm

yeah pge just does that for some reason. That's separate to block config though, which is what affects the game.

Animebryan
Spike
Spike
Posts: 262
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Contact:

Re: Need a list of ALL custom block settings

Postby Animebryan » Sun Jan 17, 2021 3:55 pm

Aaaaaaaaaaaaaaaagggggggggggggggggghhhhhhhhhhhhhhhhhhhh!!! Why won't it animate?!!!

Code: Select all

--Blockmanager is required for setting basic Block properties
local blockManager = require("blockManager")

--Create the library table
local sampleBlock = {}
--BLOCK_ID is dynamic based on the name of the library file
local blockID = BLOCK_ID

--Defines Block config for our Block. You can remove superfluous definitions.
local sampleBlockSettings = {
	id = blockID,
	--Frameloop-related
	frames = 2,
	framestyle = 0,
	framespeed = 8, --# frames between frame change
	
	--Identity-related flags:
	--semisolid = false, --top-only collision
	--sizable = false, --sizable block
	--passthrough = false, --no collision
	--bumpable = false, --can be hit from below
	--lava = false, --instakill
	--pswitchable = false, --turn into coins when pswitch is hit
	--smashable = 0, --interaction with smashing NPCs. 1 = destroyed but stops smasher, 2 = hit, not destroyed, 3 = destroyed like butter

	--floorslope = 0, -1 = left, 1 = right
	--ceilingslope = 0,

	--Emits light if the Darkness feature is active:
	--lightradius = 100,
	--lightbrightness = 1,
	--lightoffsetx = 0,
	--lightoffsety = 0,
	--lightcolor = Color.white,

	--Define custom properties below
}

--Applies blockID settings
blockManager.setBlockSettings(sampleBlockSettings)

--Register the vulnerable harm types for this Block. The first table defines the harm types the Block should be affected by, while the second maps an effect to each, if desired.

--Custom local definitions below


--Register events
function sampleBlock.onInitAPI()
	blockManager.registerEvent(blockID, sampleBlock, "onTickEndBlock")
	--registerEvent(sampleBlock, "onBlockHit")
end

function sampleBlock.onTickEndBlock(v)
    -- Don't run code for invisible entities
	if v.isHidden or v:mem(0x5A, FIELD_BOOL) then return end
	
	local data = v.data
	
	--Execute main AI here. This template hits itself.
	--v:hit()
end

--Gotta return the library table!
return sampleBlock
Image

Animebryan
Spike
Spike
Posts: 262
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Contact:

Re: Need a list of ALL custom block settings

Postby Animebryan » Thu Jan 21, 2021 9:02 pm

No, seriously! Why won't it animate?

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

Re: Need a list of ALL custom block settings

Postby Emral » Fri Jan 22, 2021 12:28 am

I dunno. You haven't shared enough information to determine the issue and I don't wanna help you if you prefer screaming over doing that.

Animebryan
Spike
Spike
Posts: 262
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Contact:

Re: Need a list of ALL custom block settings

Postby Animebryan » Fri Jan 22, 2021 10:12 pm

Enjl wrote:
Fri Jan 22, 2021 12:28 am
I dunno. You haven't shared enough information to determine the issue and I don't wanna help you if you prefer screaming over doing that.
It animates in the editor just not when playing, so the problem has to be with the lua file, but I can provide the txt file just in case.
As for the screaming, I've wasted a few hours trying everything I could to fix the problem, to the point where I went from cranking out about 1 level every day or every 2 days to suddenly putting my episode on hold once again (for the umpteenth time) until the issue is resolved. You clearly don't understand how frustrating it is dealing with this shit over & over again. I just want to finish making my episode with no more problems.

block-109.txt (using the block-n.txt template)

frames=2
framestyle=0
framespeed=8

sizable = false
passthrough = false
pswitchable = false
lava = false
semisolid = false
floorslope = 0
ceilingslope = 0
bumpable = false
smashable = 0

lightoffsetx = 0
lightoffsety = 0
lightradius = 128
lightbrightness = 1
lightcolor = white
lightflicker = false

I had a ini file before but the graphic animates perfectly fine in the editor without one so I deleted it, since only lua files effect it while playing.

Hoeloe
Phanto
Phanto
Posts: 1465
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Pronouns: she/her

Re: Need a list of ALL custom block settings

Postby Hoeloe » Fri Jan 22, 2021 10:52 pm

Blocks from 1.3 currently cannot have their animation settings changed via configs.

Animebryan
Spike
Spike
Posts: 262
Joined: Fri Jun 03, 2016 5:40 pm
Flair: Need help!
Contact:

Re: Need a list of ALL custom block settings

Postby Animebryan » Sat Jan 23, 2021 4:27 am

I see. But I also tried to set this up as a custom block (block-751) and had the same problem.


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari