In App Purchase is an option you can use where players can buy goods or items from you inside your game.

1. USING IN APP PURCHASE TO UNLOCK A CHARACTER

In this guide, I started by creating a simple Avoidance game using the below options.

Once done, it will take you to this page. Click on the Menu Editor button in order to see the Game Mind Map.

Then double click on the World Select UI.

Under the Buttons category, drag the Navigation Button to where you want to put it.

Then change the name and drag an image for it.

Now lets go back to the Game Mind Map. To do that click on the Menu Editor Button.
Once you are in the Game Mind Map, right click on the grid area and select Add New UI.

Once done, you will see a new UI. Change its name on the right hand portion. In this instance, I named it Unlock UI.

Now make sure that you link the unlock ports. Let us double click the World 1 so we can start making characters to unlock.

Inside the world, the easiest way to create a new character is to click on your character and press D on your keyboard.

It will then duplicate your character. Now, select your duplicated character and change its name and image.

In that same panel, you will also see the option to use In App Purchase as your purchase method. Store Identifier is unique code that you must create. It has to have at least 1 period ".". A good example for this is: com.characterunlock.samplegamename

You can also create as many character as you want.

Now lets go back to the world UI that we created and create selection for our characters. Double click on the Unlock UI.

Then go to the Characters category and drag and drop Multiple Unlock since we have multiple characters. Make sure to widen the area so you can see all your characters.

Dont forget to put a lock in the unlock area.

Now drag and drop a Navigation Button to your desired area and put an image to it.

And then link it to World Select UI so you can go back to your world selection after selecting a character.

Now when you preview your game, you will see that the additional characters are locked until purchased.


2. USING IN APP PURCHASE TO UNLOCK A WORLD 

Here are the steps to lock and unlock:
Go to the Game Mind Map and double click World Select UI.

First we need to lock world 2. Click and delete it.

Under the Buttons category, drag and drop the Lock Button to where you previously have World 2.

While the Lock button is selected, change its name to your desired world name. In this instance "World 2", then drag and drop your World 2 image and include a locked image for it.

Now lets click the Menu Editor button to go back to the Mind Map and connect the World Select UI to World 2.

When you preview your game, you will see your World 2 is locked.

Now these are options to unlock a world if a lock button is used.
Default - You will have to use an Unlock Logic Piece to unlock.
In Game Currency - Unlock using coins collected in the game.
In App Purchase - Unlocking using an actual money.



3. USING IN APP PURCHASE TO UNLOCK ACTIONS. 

There are also some action options that we can include in our store. Like an Invincibility Power Up or a bomb like item that can kill all enemy upon use, or maybe a magnet that collect coins for a certain time. In short, any available action that can be used in the game can be purchased using real money. Let me show you an example. Let us go ahead and open our Game World.

Once there, let us drag and drop an image that we will use for our action item. 

Once you have the image inside, you can just delete it. We just imported it so we can edit its settings but we don't really need the physical item in the game world. 

On the assets panel on the left, click your imported image, change its name to Coin Magnet and select Powerup Magnet as the Action Type.

Once done, go back to the mind map and let us put it in our Store by going to the Store UI. Inside, let us drag a Purchase Button to the desired location. I also created a Power Ups label from the Labels button.

Now the pen icon on the Image section will allow you to get the image that we imported earlier. I will show that to you after this illustration but for now, make sure you select the options shown below.

Here is the the window that will open when you click the pen icon on the image section. This is where you will find the icon that you imported earlier. All you need to do is to scroll down till you find it then click save.

Now we need to go back to the Game Mind Map so we can make this work. Let us open World UI and drag an Action Button where we want to place it. This will serve as a button the players can press to activate what kind of power up they have purchased. In this instance, its coin magnet.

To complete, these are the options that I have selected. Make sure that the Refill portion is empty.

If look at the illustration below, the first one shows that the button is not highlighted when purchased, it will then be highlighted and when pressed, the action will take effect. 


4. We can also create Checkpoints and sell it in our store so players can purchase them. Checkpoints can be used to skip scenes or levels. It can also serve as a continue button when players runs out of their game life. 

Sometimes the images are too big so we have to adjust by holding the left clicker on our mouse and drag the corners until you reach your desired size.

After we adjust, we also need to edit the collision shape by clicking the edit button. See the option in the illustration below.

Now that we have our checkpoint, let us set up a restart checkpoint so when our player dies, they can start from the last checkpoint, and give them an option to purchase when it runs out.

In our game world, let us drag an image for NEXT CHECKPOINT just like what we did  in SET CHECKPOINT. This time we will have to delete it because we don't want it as an item that we need to go to in our game.
After deleting the image in the middle part, go to the image on the assets panel on your left so we can edit the options for it. Change name to RESTART CHECKPOINT and select Restart Checkpoint as an Action Type.

Now let go back to the Game Mind Map and open Game OVER UI.
The illustration below shows that I have dragged an Action Button to where Main Menu button is previously located.

Then imported an image by dragging it to the image part of the options panel. Now make sure that you select RESTART CHECKPOINT as the action. If you also notice, used 2 Max Refill so players have to ability to go back to last check point and when they are out, they will have the option to purchase more from our store.

Here is what it looks like when they reach the game over page, the one on the right shows that they are already out of continues.

Now to set up In App Purchase for the Restart Checkpoint, we first need to go to our Store UI.

In the Store UI,
1.I dragged and dropped a purchase button to my desired location.
2.I selected an image to use.
3.I scaled the image as .12 for both x an y axis.
4.Selected RESTART CHECKPOINT as Action Selection.
5.Chose Capacity 1 so they can purchase it one at a time(all depends on you)
6.Selected In App Purchase.

So now when they are out, and purchased it in our store, they will have an ability to purchase it in our store.

5. USING IN APP PURCHASE TO ADD COINS
In a scenario where you use In Game Currency to purchase or unlock Character, Worlds or special abilities using coins collected in the game, you can set up In App Purchase to sell coins which will help your players easily unlock what they need.

Here are the instructions below:
In our game world, let us drag an image to the action part of the Buildbox wheel. 

Once you have the image inside, we can just delete it. We just imported it so we can edit its settings but we don't really need the physical item in the game world.
Lets click the imported image on the assets panel on the left hand side and make the necessary adjustment in the options panel to the right side. It is important to change the name as you will be linking a Purchase Button to it. Reward Coins is the amount of coins you want to sell.

Now lets go to our Store UI, let us drag and drop a Purchase Button and a Label.

After dragging an image for the coins and renaming the label, make sure that you select 100 coins in the Action Selection instead of just Coins.

IMPORTANT REMINDER: STORE IDENTIFIER IS A CODE THAT YOU MUST CREATE IN ORDER FOR YOUR ITEMS TO BE PURCHASED IN PLAYSTORE OR ITUNES. IT MUST BE UNIQUE FOR EVERY PURCHASE AND MUST INCLUDE AT LEAST ONE DOT/PERIOD. 

Below are example patterns that you can refer to:

com.unlockcharacters.samplegamename
worldunlock.samplegamename
removeads.samplegamename
invincibilityunlock.gamename

Please note that these code will be used in Google Play Game Services or iTunes Connect when you sign up.

Did this answer your question?