Page 1 of 1

( Request) Character Specific Powerup Code

Posted: Sun Jun 07, 2020 9:59 am
by DrMekar
Hi, though I'd need a Character specific Code that turns Leafs and Tanooki's into
other Powerups when playing as a Toad for MH1.5 since Jill, who replaces Toad
in MH1.5 already has the exclusive coyotetime abilty by Enjl and she would be
too OP otherwise.

In short terms, I need a Code that turns Leafs and Tanooki Powerups into other
Powerups when playing as Toad. I had in mind that the Leaf turns into a Fire
Flower and the Tanooki into a Ice Flower.

Thanks in Advance.

Re: ( Request) Character Specific Powerup Code

Posted: Sun Jun 07, 2020 10:09 am
by MrDoubleA
For future reference, requests should go in the LunaLua Help subforum. Anyhow, what exactly do you mean by "turn powerups into other powerups"? Do you mean that the NPC is replaced by another NPC, or that the powerup has the effects of another one?

Re: ( Request) Character Specific Powerup Code

Posted: Sun Jun 07, 2020 11:07 am
by DrMekar
MrDoubleA wrote:
Sun Jun 07, 2020 10:09 am
For future reference, requests should go in the LunaLua Help subforum.
Okay, that was my first Lua Request, so I wasn't sure rather to post it here or in Help.
MrDoubleA wrote:
Sun Jun 07, 2020 10:09 am
Do you mean that the NPC is replaced by another NPC
Like that, Yeah though on a Character Bases. For Example if a Block contains a Leaf and Mario hits it, a Leaf comes out, if Jill, who
replaces Toad hits a the same Block though, a Fire Flower should spawn because Jill will not have acess to Leafs and Tanooki's at all,
it's similair to Link in that case who gets a Heart instant of a Mushroom.

Re: ( Request) Character Specific Powerup Code

Posted: Sun Jun 07, 2020 12:42 pm
by Emral
The code for that essentially boils down to:
if player.character == 4 then
for k,v in ipairs(NPC.get(leaf id, player.section)) do
v:transform(some other id)
end
end
in onTickEnd.

Sidenote: I consider coyotetime to be more of a convenience function to make gameplay less frustrating, than an ability. Prepare for people feeling unfairly treated as jumps that worked with one character will seem a lot tighter with others that don't have coyote time available.

Re: ( Request) Character Specific Powerup Code

Posted: Sun Jun 07, 2020 1:17 pm
by DrMekar
Enjl wrote:
Sun Jun 07, 2020 12:42 pm
The code for that essentially boils down to:
if player.character == 4 then
for k,v in ipairs(NPC.get(leaf id, player.section)) do
v:transform(some other id)
end
end
in onTickEnd.
Thank You.
Enjl wrote:
Sun Jun 07, 2020 12:42 pm
Sidenote: I consider coyotetime to be more of a convenience function to make gameplay less frustrating, than an ability. Prepare for people feeling unfairly treated as jumps that worked with one character will seem a lot tighter with others that don't have coyote time available.
I hear you. I just thought it would be a good thing for Jill, since she can't use Leaf and Tanooki for reasons explained in the Story
and the only other abilitys currently aviable (I could find) are the Groundpound, Your Wall Jump and the Mid-Air Twirl. The Twirl
is already a feature everybody can use and Wall Jumps feels kinda weird since it's Mario Key Ability + it would break some levels.
The Groundpound is problably reserved for another Character, who will be unlocked later.

Another Ability I could think of for Jill would be the Ability to walk up certain types of Metal Walls, but I think this would be too much to do and
also to restrictive.