(Request) Working shop and no 1-ups via coins

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

Moderator: Userbase Moderators

deadlydiamond98
Buster Beetle
Buster Beetle
Posts: 88
Joined: Sun Oct 07, 2018 5:41 am
Flair: BoInG BoInG! Im Mr SaTuRn!
Contact:

(Request) Working shop and no 1-ups via coins

Postby deadlydiamond98 » Sat Nov 23, 2019 2:47 pm

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.

Cedur
Link
Link
Posts: 7073
Joined: Tue Jun 28, 2016 10:14 am
Flair: I'm gone, for chess and minesweeper
Pronouns: he/him

Re: (Request) Working shop and no 1-ups via coins

Postby Cedur » Sat Nov 23, 2019 3:09 pm

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.

deadlydiamond98
Buster Beetle
Buster Beetle
Posts: 88
Joined: Sun Oct 07, 2018 5:41 am
Flair: BoInG BoInG! Im Mr SaTuRn!
Contact:

Re: (Request) Working shop and no 1-ups via coins

Postby deadlydiamond98 » Sat Nov 23, 2019 7:37 pm

ok thanks

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9891
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: (Request) Working shop and no 1-ups via coins

Postby Emral » Sun Nov 24, 2019 4:44 am

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.


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 34 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari