How add a shop in game?

Show us your works in progress and request feedback

Post » Wed Mar 11, 2015 9:55 pm

Hi to all
i wanna know if its possible add a shop in a game, taking coins in the game and use in a shop for buy power ups or something like that...
if any know a tutorial

please help me and thanks
B
10
S
2
G
1
Posts: 35
Reputation: 691

Post » Thu Mar 12, 2015 12:01 am

Message: CigarOfSinatra can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I did what your asking for in my game.

Create a global variable for the players wallet/inventory/totalMoney etc..

Create an event that add's 1 to the variable everytime a player collects a coin.
Create a variable for each power-up have it set to "0" if the player has not purchased the powerup.
Create a check that looks to see if the player has enough coins, and hasnt already purchased the power up.
If player has coins to purchase, set upgradeONE.instanceVariable(purchased) = 1

Have your power ups coded in so that once the player has purchased the upgrade, the upgrade applies to them.
Create a game asset for your power up(art) and a store art asset (a pop-up window sprite etc..).
When player wants to purchase a upgrade from your shop. Provide them away to open the store (a button to click on..)

Here is a link to a "How Do I" section, very useful how-do-i-frequently-asked-questions_t63692
B
11
S
1
Posts: 40
Reputation: 530

Post » Fri Mar 13, 2015 2:35 pm

Thanks !!
B
10
S
2
G
1
Posts: 35
Reputation: 691


Return to Works in Progress/Feedback Requests

Who is online

Users browsing this forum: AySquirrel, mercuryus, rifkisanofta and 0 guests