(Help) disable small state

Post here for help and support regarding LunaLua and SMBX2's libraries and features.
vee_Sleepy
Fighter Fly
Fighter Fly
Posts: 40
Joined: Tue Nov 29, 2022 7:15 pm
Flair: oh worm?
Pronouns: they/it

(Help) disable small state

Postby vee_Sleepy » Wed May 17, 2023 4:48 pm

What would I put in my episode's luna script file to make it so the player can't lose their big powerup state (state 1) when taking damage?
I thought to make a Wario episode using AppleTheTomato's "Hearts for All" script, so he can still die but Wario only has his full moveset when big and him staying big no matter what would be really handy

thanks in advance!

ShadowXeldron
Snifit
Snifit
Posts: 232
Joined: Sun Dec 08, 2019 8:21 am
Flair: phpBB > ProBoards
Pronouns: He/Him
Contact:

Re: (Help) disable small state

Postby ShadowXeldron » Fri May 19, 2023 5:43 pm

I'd probably check if Wario works with customHealth.lua: viewtopic.php?t=28975

Alternatively, you can use this:

Code: Select all

function onDraw()
    if player.powerup == 1 and player.forcedState ~= FORCEDSTATE_POWERDOWN_SMALL then
        player.powerup = 2
    end
end
Note that you'll probably have to make a custom player health function if you use the above script because it basically makes the player unkillable.

vee_Sleepy
Fighter Fly
Fighter Fly
Posts: 40
Joined: Tue Nov 29, 2022 7:15 pm
Flair: oh worm?
Pronouns: they/it

Re: (Help) disable small state

Postby vee_Sleepy » Fri May 19, 2023 7:56 pm

idk how to code custom functions
i know very very little about lua scripting


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 0 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari