Coins with different values

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

Moderator: Userbase Moderators

Sednaiur
Volcano Lotus
Volcano Lotus
Posts: 580
Joined: Fri Dec 20, 2013 2:16 pm

Coins with different values

Postby Sednaiur » Sat Feb 08, 2020 6:03 pm

Hello.

I like to make coins that are worth different amounts of money, like a silver coin being worth 1 coin or a golden coin being worth 2 coins.
I took a closer look into the lua-codes and ini-codes of the templates as well as some of the new NPCs, but I cannot really figure out how to accomplish my goal.

So I wonder if someone could post a code that makes this possible, so I can see and learn how this functions properly.

I am glad for any help.

MrDoubleA
Edward
Edward
Posts: 394
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?

Re: Coins with different values

Postby MrDoubleA » Sat Feb 08, 2020 6:54 pm

Well, there's Defines.coinValue, Defines.coin5Value, and Defines.coin20Value which affects how much the different coins are worth.

Sednaiur
Volcano Lotus
Volcano Lotus
Posts: 580
Joined: Fri Dec 20, 2013 2:16 pm

Re: Coins with different values

Postby Sednaiur » Sat Feb 08, 2020 7:32 pm

Interesting to know.

Though, the problem I have is that I do not know what lines I need exactly to create a coin-npc in lua, as there is no example I could use. The closest I could get, is the Sonic Ring Monitor and that is more like a Goomba than a coin.
I am willing to learn but out of all the languages I have seen so far, lua is the least self explantory to me.


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 18 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari