Custom Effects Not Rendering

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

Moderator: Userbase Moderators

mariobrigade2018
Rocky Wrench
Rocky Wrench
Posts: 612
Joined: Wed May 24, 2023 7:00 pm
Flair: OK in coding who dreams of making a Mario game
Pronouns: he/him

Custom Effects Not Rendering

Postby mariobrigade2018 » Sun Jul 16, 2023 7:57 pm

So I have this Beach Koopa effect that will only show his head when killed.


Image

Here's the effect.


Image

Hope this is enough info.

deice
Volcano Lotus
Volcano Lotus
Posts: 596
Joined: Fri Jul 23, 2021 7:35 am

Re: Custom Effects Not Rendering

Postby deice » Mon Jul 17, 2023 4:59 am

effects with ids smaller than 161 cannot have their size changed (at least not without manual rendering via lua). the effect in question is 32x32, so only the top half of what's supposed to be each frame renders.

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

Re: Custom Effects Not Rendering

Postby Emral » Mon Jul 17, 2023 5:05 am

deice wrote:
Mon Jul 17, 2023 4:59 am
effects with ids smaller than 161 cannot have their size changed (at least not without manual rendering via lua). the effect in question is 32x32, so only the top half of what's supposed to be each frame renders.
Not entirely true, as most effects of that sort are affected by width/height/gfxwidth/gfxheight of the associated NPC. But it could be that beach koopas are a special case. Would need to see the NPC config for these beach koopas.

deice
Volcano Lotus
Volcano Lotus
Posts: 596
Joined: Fri Jul 23, 2021 7:35 am

Re: Custom Effects Not Rendering

Postby deice » Mon Jul 17, 2023 5:13 am

Emral wrote:
Mon Jul 17, 2023 5:05 am
Not entirely true, as most effects of that sort are affected by width/height/gfxwidth/gfxheight of the associated NPC. But it could be that beach koopas are a special case. Would need to see the NPC config for these beach koopas.
i checked the source code and you're actually right, in this case it does depend on the physical height of the npc. so, if op were willing to extend the beach koopas' hitboxes to be a full 52 pixels tall (to match the custom graphic), the effect would render correctly without the need for any lua shenanigains.

mariobrigade2018
Rocky Wrench
Rocky Wrench
Posts: 612
Joined: Wed May 24, 2023 7:00 pm
Flair: OK in coding who dreams of making a Mario game
Pronouns: he/him

Re: Custom Effects Not Rendering

Postby mariobrigade2018 » Tue Jul 18, 2023 12:34 am

OK. Will do. Thanks Guys!


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari