(Request) Working shop and no 1-ups via coins
Posted: Sat Nov 23, 2019 2:47 pm
by deadlydiamond98
Hey, I know this is quite a stupid request, but how do I making a functional shop, and if possible could it be made to work with co-op. I am currently using SMBX 3.0 (not pal or MAGLX3 because I'd rather wait for the full version before developing an episode) so I'm sorry If I'm being dumb. I am a noob with LunaLua so I'm sorry if I'm making a big request. If It isn't too much to ask, I would like to make poison mushrooms cost 1, super mushrooms 50 coins, fire flowers 100 coins, tanooki leaves cost 150, 1-ups cost 200, kurubi shoes cost 250, a yoshi cost 300, ice flowers cost 300, tanooki suits cost 400, a red yoshi cost 450, a yellow yoshi cost 450, a purple yoshi cost 450 podobo shoes cost 500, hammer suits cost 500, a pink yoshi cost 550, a ice yoshi cost 550 lakitu shoes cost 750, and a black yoshi cost 800. Also, because of the shop I would like to request no 1ups by getting 100 coins. I'm sorry if this is a lot, but thanks in advance.
Re: (Request) Working shop and no 1-ups via coins
Posted: Sat Nov 23, 2019 3:09 pm
by Cedur
Shops have been discussed multiple times on chat. I guess 1amPlayer and MrDoubleA could assist you.
Also you should consider if it's really advisable to have all Yoshis and shoes in the shop, as it could really break some levels. If anything, go for smaller and different shops as the game proceeds.
Re: (Request) Working shop and no 1-ups via coins
Posted: Sat Nov 23, 2019 7:37 pm
by deadlydiamond98
ok thanks
Re: (Request) Working shop and no 1-ups via coins
Posted: Sun Nov 24, 2019 4:44 am
by Emral
viewtopic.php?f=101&t=24798
This takes care of the 1up thing and having a reference to your currency. The code on top for checking if the player has more than a certain sum of money is just simple comparison operators that give you the item if the player has enough money. One way to handle such a shop would be to use onEvent and call a SMBX event for each shop item, and then check in onEvent for that event for if the player qualifies to have the item. If not, you can Test.showMessageBox("You don't have enough money."), or do anything you like to convey the same idea.