Need help with lua? - LunaLua General Help

Post here for help and support regarding LunaLua and SMBX2's libraries and features.
deice
Volcano Lotus
Volcano Lotus
Posts: 587
Joined: Fri Jul 23, 2021 7:35 am

Re: Need help with lua? - LunaLua General Help

Postby deice » Thu Jan 09, 2025 6:52 pm

Jokyaku wrote:
Thu Jan 09, 2025 4:58 pm
Hello! I'm currently just finishing a custom NPC and I was wondering if there was any way of using Extra Settings to alter an NPC Config such as nofireball or jumphurt.
extra settings are typically used for setting parameters on individual npc instances, whereas npc config (aside from some outliers like noblockcollision) have no way of being applied selectively. there are ways to emulate certain npc config flags (e.g. cancelling a harm event for a specific npc with a certain setting applied to make it immune to fireballs) but this depends heavily on the use case

could you elaborate on exactly what you're trying to do?

jokyaku
Goomba
Goomba
Posts: 4
Joined: Thu Jan 20, 2022 7:44 am
Pronouns: he/him

Re: Need help with lua? - LunaLua General Help

Postby jokyaku » Fri Jan 10, 2025 6:07 am

deice wrote:
Thu Jan 09, 2025 6:52 pm
Jokyaku wrote:
Thu Jan 09, 2025 4:58 pm
Hello! I'm currently just finishing a custom NPC and I was wondering if there was any way of using Extra Settings to alter an NPC Config such as nofireball or jumphurt.
extra settings are typically used for setting parameters on individual npc instances, whereas npc config (aside from some outliers like noblockcollision) have no way of being applied selectively. there are ways to emulate certain npc config flags (e.g. cancelling a harm event for a specific npc with a certain setting applied to make it immune to fireballs) but this depends heavily on the use case

could you elaborate on exactly what you're trying to do?
I'm making a "Bro" NPC with way too many variants so I'm using Extra Settings to alter which variant I want instead of using a different NPC slot for each one, sorta like how the Paratroopa works but with more variants and also changing the sprite on each one.

I wanted to know if changing the config in a case by case basis was possible since it would be a lot easier to manage, but if it's not possible I'll just emulate the behavior like you mentioned, thanks for the help.

Image

Muffler
Shy Guy
Shy Guy
Posts: 5
Joined: Wed Jan 20, 2021 12:42 pm
Pronouns: he/him

Re: Need help with lua? - LunaLua General Help

Postby Muffler » Mon Jan 13, 2025 3:08 pm

Is there a way to check if the player is riding a Yoshi?

mariobrigade2018
Volcano Lotus
Volcano Lotus
Posts: 524
Joined: Wed May 24, 2023 7:00 pm
Flair: Normie in coding who dreams of making a Mario game
Pronouns: he/him

Re: Need help with lua? - LunaLua General Help

Postby mariobrigade2018 » Mon Jan 13, 2025 7:23 pm

Muffler wrote:
Mon Jan 13, 2025 3:08 pm
Is there a way to check if the player is riding a Yoshi?

Code: Select all

if player.mount == MOUNT_YOSHI then
	--do code
end
https://docs.codehaus.moe/#/constants/mounts

Muffler
Shy Guy
Shy Guy
Posts: 5
Joined: Wed Jan 20, 2021 12:42 pm
Pronouns: he/him

Re: Need help with lua? - LunaLua General Help

Postby Muffler » Tue Jan 14, 2025 11:00 am

mariobrigade2018 wrote:
Mon Jan 13, 2025 7:23 pm
Muffler wrote:
Mon Jan 13, 2025 3:08 pm
Is there a way to check if the player is riding a Yoshi?

Code: Select all

if player.mount == MOUNT_YOSHI then
	--do code
end
https://docs.codehaus.moe/#/constants/mounts
Thank you sm!


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 0 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari