Page 1 of 1

Boomerang Suit?

Posted: Thu Mar 26, 2020 3:50 pm
by Maxjacinto2
So, I was wondering if it is possible to add a new power-up (without replacing existing ones) that allow Luigi to throw Toad's boomerang. I have seen that somebody was able to make a Bubble power-up some years ago, but I don't know if a code similar to that would work.

Re: Boomerang Suit?

Posted: Thu Mar 26, 2020 3:54 pm
by PdizzleParker
Maxjacinto2 wrote:
Thu Mar 26, 2020 3:50 pm
So, I was wondering if it is possible to add a new power-up (without replacing existing ones) that allow Luigi to throw Toad's boomerang. I have seen that somebody was able to make a Bubble power-up some years ago, but I don't know if a code similar to that would work.
That depends on what version of SMBX you're using are you using 2.0 or 38a?

Re: Boomerang Suit?

Posted: Thu Mar 26, 2020 3:57 pm
by Maxjacinto2
2.0 Beta 4 at the moment

Re: Boomerang Suit?

Posted: Thu Mar 26, 2020 4:12 pm
by DrMekar
Maxjacinto2 wrote:
Thu Mar 26, 2020 3:57 pm
2.0 Beta 4 at the moment
Okay, though without replacing another one it's NOT possible at the moment.

Re: Boomerang Suit?

Posted: Tue Mar 31, 2020 1:14 pm
by MrDoubleA
DrMekar wrote:
Thu Mar 26, 2020 4:12 pm
Maxjacinto2 wrote:
Thu Mar 26, 2020 3:57 pm
2.0 Beta 4 at the moment
Okay, though without replacing another one it's NOT possible at the moment.
Even if it may not be possible to truly add new powerups, it is possible to create the illusion of new powerups at the moment. Regardless, it's not exactly easy at the moment. Personally, I'd wait for Novarender's Custom Powerups System (if he's still working on it, that is).

Re: Boomerang Suit?

Posted: Mon Apr 20, 2020 1:11 pm
by yoshiegg
As we have a range of dummy npc since, I think, Beta 3, I imagine you could create a new NPC in that range having the same behavior and properties of a vanilla powerup and then make an onNPCKill event in lua setting a variable to true. Now you only need to set this variable back to false if the powerup state of the player is unequal to the one the new NPC turns the player into or if the player collects another powerup that makes him turn into that state. I have seen someone (TheDinoKing, if I remember correctly) using this method to add a superball flower over one of the three fireflower slots. However, I'm not the greatest expert there is when it comes to NPC modification so please correct me incase I'm wrong or approve if this is indeed possible.
Another thought of mine would be just making that NPC collectable, then toggle a variable to true when collecting it and make it change to false when the player is hit via a player:mem offset or when he collects a powerup via the onNPCKill event with if KiledNPC.id == 9 or killedNPC.id == 14 and so on (the npc ids of all powerups except for the mushrooms). Also I think you might want to look into the AnotherPowerup Script written by Enjl.