Changing hardcoded HUD graphics depending on the player in a seperate episode?

Share and discuss custom LunaLua code and content packs for SMBX2.

Moderator: Userbase Moderators

Giggs-Chan
Fighter Fly
Fighter Fly
Posts: 34
Joined: Mon Aug 22, 2022 12:21 pm
Contact:

Changing hardcoded HUD graphics depending on the player in a seperate episode?

Postby Giggs-Chan » Fri Nov 04, 2022 9:19 am

Is there a way to change the player icon depending on what your player is? M if Mario L if Luigi instead of showing 1UP or 2UP? It's possible with Wario but how do I do this for the rest of the characters? I know it's possible for SMBX 38A but is it possible in SMBX2?

deice
Rocky Wrench
Rocky Wrench
Posts: 620
Joined: Fri Jul 23, 2021 7:35 am

Re: Changing hardcoded HUD graphics depending on the player in a seperate episode?

Postby deice » Fri Nov 04, 2022 9:28 am

this can be done using Graphics.registerCharacterHUD.

Giggs-Chan
Fighter Fly
Fighter Fly
Posts: 34
Joined: Mon Aug 22, 2022 12:21 pm
Contact:

Re: Changing hardcoded HUD graphics depending on the player in a seperate episode?

Postby Giggs-Chan » Fri Nov 04, 2022 9:32 am

Okay, how do you do it on THIS HUD? (I also can't code at all. :()
viewtopic.php?t=27542
THIS is the HUD I'm using.

deice
Rocky Wrench
Rocky Wrench
Posts: 620
Joined: Fri Jul 23, 2021 7:35 am

Re: Changing hardcoded HUD graphics depending on the player in a seperate episode?

Postby deice » Fri Nov 04, 2022 9:43 am

Giggs-Chan wrote:
Fri Nov 04, 2022 9:32 am
Okay, how do you do it on THIS HUD? (I also can't code at all. :()
viewtopic.php?t=27542
THIS is the HUD I'm using.
the script you linked loads all the images exactly once when it itself is loaded, so such overriding wouldn't be possible without heavy modifications made to it. i suggest you post in that thread to inquire about extra features (most people in here or lunalua help won't assume you're using external libraries unless you specify that you are).

Marioman2007
2025 Egg Hunter
2025 Egg Hunter
Posts: 544
Joined: Tue Aug 25, 2020 3:19 am
Flair: Dr. Bones
Pronouns: He/Him

Re: Changing hardcoded HUD graphics depending on the player in a seperate episode?

Postby Marioman2007 » Fri Nov 04, 2022 9:22 pm

Giggs-Chan wrote:
Fri Nov 04, 2022 9:19 am
Is there a way to change the player icon depending on what your player is? M if Mario L if Luigi instead of showing 1UP or 2UP? It's possible with Wario but how do I do this for the rest of the characters? I know it's possible for SMBX 38A but is it possible in SMBX2?

viewtopic.php?t=25570


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 2 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari