Fire Necky Boss Fight!

Share and discuss custom LunaLua code and content packs for SMBX2.
Mal8rk
Snifit
Snifit
Posts: 200
Joined: Mon Oct 25, 2021 11:04 pm
Flair: English Speaking Spanish Speaker
Pronouns: He/Him
Contact:

Fire Necky Boss Fight!

Postby Mal8rk » Mon Mar 04, 2024 4:56 pm

Yo whattup people!

Ever wanted to square up against a giant flaming hot aviant? Well that dream is now coming true with the...

Image

A boss that took me a pretty long time to figure out, who can shoot flaming rocks, and fly towards you!

Screenies
Spoiler: show
Image
Image
Image
Image

Download it!

Credits:
Spoiler: show
Marioman2007 for the npc assembling help

Frario and christopherparaujo89 for the Fire Necky & effects rips

If I forgot to credit someone, please let me know

I should also mention that everyone is free to use this boss in their projects as long as I'm credited. I'll add this to my NPC pack later

DisasterMaster
Monty Mole
Monty Mole
Posts: 147
Joined: Fri Jan 31, 2020 10:01 pm

Re: Fire Necky Boss Fight!

Postby DisasterMaster » Sat Mar 09, 2024 3:47 pm

I discovered that this error occurs when you don't start the level in the same section as the boss and then use the editor's function to jump to a checkpoint within the boss' section.

Image

Mal8rk
Snifit
Snifit
Posts: 200
Joined: Mon Oct 25, 2021 11:04 pm
Flair: English Speaking Spanish Speaker
Pronouns: He/Him
Contact:

Re: Fire Necky Boss Fight!

Postby Mal8rk » Fri Mar 15, 2024 8:59 am

DisasterMaster wrote:
Sat Mar 09, 2024 3:47 pm
I discovered that this error occurs when you don't start the level in the same section as the boss and then use the editor's function to jump to a checkpoint within the boss' section.

Image
Replace the entire onDrawNPC function in the Fire Necky's lua file with this:

Code: Select all

function sampleNPC.onDrawNPC(v)
	if v.despawnTimer <= 0 or v.isHidden or not v.data.initialized then return end

	local config = NPC.config[v.id]
	local data = v.data

	local pivotOffsetX = 0
	local pivotOffsetY = 0

	local opacity = 1

	local priority = 1
	if lowPriorityStates[v:mem(0x138,FIELD_WORD)] then
		priority = -75
	elseif v:mem(0x12C,FIELD_WORD) > 0 then
		priority = -30
	elseif config.foreground then
		priority = -125
	end

	--Text.print(v.x, 8,8)
	--Text.print(data.timer, 8,32)

	if v:mem(0x156,FIELD_WORD) > 0 then
		opacity = math.sin(lunatime.tick()*math.pi*0.25)*0.1 + 0.9
	end

	local img = config.headImage
	local headHeight = img.height/config.headFrames
	
	Graphics.drawBox{
		texture = img,
		x = v.x+config.headOffsetX,
		y = v.y+config.headOffsetY,
		width = -img.width * v.direction,
		sourceY = data.headFrame * config.headHeight,
		sourceHeight = config.headHeight,
		sceneCoords = true,
		centered = true,
		priority = priority,
		rotation = data.rotation,
	}

	local img = config.mouthImage
	local headHeight = img.height/config.headFrames
	
	Graphics.drawBox{
		texture = img,
		x = v.x+config.headOffsetX,
		y = v.y+config.headOffsetY,
		width = -img.width * v.direction,
		sourceY = data.mouthFrame * config.headHeight,
		sourceHeight = config.headHeight,
		sceneCoords = true,
		centered = true,
		priority = priority-45,
		rotation = data.rotation,
	}

	local img = Graphics.sprites.npc[v.id].img

    Graphics.drawBox{
        texture = img,
        x = v.x + v.width/2,
        y = v.y + v.height - img.height/2,
        width = config.gfxwidth * v.direction,
        sourceY = v.animationFrame * config.gfxheight,
        sourceHeight = config.gfxheight,
        sourceWidth = config.gfxwidth,
        sceneCoords = true,
        centered = true,
        priority = priority,
        rotation = data.rotation,
    }

	data.birdYPos = Sprite{texture = txture}

	local plr = npcutils.getNearestPlayer(v)
	data.birdYPos.position = vector(v.x, plr.y + 4)
end


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 0 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari