Dragon Coin Counter?

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

AToMIC
Monty Mole
Monty Mole
Posts: 110
Joined: Fri Jan 24, 2014 2:57 pm
Flair: I'm here
Pronouns: He/Him

Dragon Coin Counter?

Postby AToMIC » Sun May 02, 2021 5:44 pm

Has anyone made a Dragon Coin counter for SMBx yet? Like the one in SMW on top of the screen? I haven't found one after searching for quite some time, but if one exists could someone link it to me?

ElectriKong
Bowser
Bowser
Posts: 4653
Joined: Mon Jun 06, 2016 4:32 pm
Pronouns: he/him
Contact:

Re: Dragon Coin Counter?

Postby ElectriKong » Sun May 02, 2021 6:21 pm

Wouldn't reskinning the star coin and just using the star coin counter be sufficient?

AToMIC
Monty Mole
Monty Mole
Posts: 110
Joined: Fri Jan 24, 2014 2:57 pm
Flair: I'm here
Pronouns: He/Him

Re: Dragon Coin Counter?

Postby AToMIC » Sun May 02, 2021 6:57 pm

Electriking wrote:
Sun May 02, 2021 6:21 pm
Wouldn't reskinning the star coin and just using the star coin counter be sufficient?
Very good idea indeed, and that was actually my OG plan for some time, but I decided I want both STAR COINS and DRAGON COINS to hide in my levels.

RadMetalMarioSMIX
Buster Beetle
Buster Beetle
Posts: 87
Joined: Sat Mar 14, 2015 6:42 pm
Flair: What kind of grave is this?
Pronouns: he/him

Re: Dragon Coin Counter?

Postby RadMetalMarioSMIX » Sun Apr 17, 2022 11:21 pm

AToMIC wrote:
Sun May 02, 2021 6:57 pm
Electriking wrote:
Sun May 02, 2021 6:21 pm
Wouldn't reskinning the star coin and just using the star coin counter be sufficient?
Very good idea indeed, and that was actually my OG plan for some time, but I decided I want both STAR COINS and DRAGON COINS to hide in my levels.
That and the Star coins don’t give a 1-Up when five are collected. Far as I know…

Bookmarking this in case I come up with something working on SMBK.

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

Re: Dragon Coin Counter?

Postby deice » Mon Apr 18, 2022 3:21 am

RadMetalMarioSMIX wrote:
Sun Apr 17, 2022 11:21 pm
That and the Star coins don’t give a 1-Up when five are collected. Far as I know…

Bookmarking this in case I come up with something working on SMBK.
the thing with dragon coins is that the game itself doesn't actually keep track of which ones you've collected, it just increases the npc's score each time one is collected inside a level. the best way that i can think of to do something like this is to create a lua table within SaveData for each level that will store which dragon coins have been collected. then, inside each level, place the dragon coins inside separate layers and give each a unique death event, and handle these events inside your global "luna.lua" by setting the appropriate values in the aforementioned table. also in the global "luna.lua", you can choose to hide the dragon coins that have already been collected via hiding the separate layers and even change the score that the next one will give accordingly (via NPC.config[274].score). the total count can then be updated by iterating through this table and manually counting them whenever a new one is collected.

i don't have an example ready but i hope this helps

PixelHoyte
Cheep-Cheep
Cheep-Cheep
Posts: 10
Joined: Mon Aug 16, 2021 5:12 am
Pronouns: he/him

Re: Dragon Coin Counter?

Postby PixelHoyte » Tue Apr 19, 2022 3:33 am

For an even simpler implementation, I have made this work using Enjl's anothercurrency.lua!


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari