Page 1 of 1

Coins with different values

Posted: Sat Feb 08, 2020 6:03 pm
by Sednaiur
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.

Re: Coins with different values

Posted: Sat Feb 08, 2020 6:54 pm
by MrDoubleA
Well, there's Defines.coinValue, Defines.coin5Value, and Defines.coin20Value which affects how much the different coins are worth.

Re: Coins with different values

Posted: Sat Feb 08, 2020 7:32 pm
by Sednaiur
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.