A Coin Shop is a UI Screen that allows the player to use the points or coins they have collected in the game to purchase a Character or Object.
The example below demonstrates how the player can purchase a red hat for their character.
Creating a Coin Shop
To create a Coin Shop menu, you need to create the following:
After the player uses a Coin Shop Button to purchase an asset, the Placeholder asset will be replaced by the purchased asset.
To create a Placeholder Asset:
- In a World Editor and in the Asset panel on the left, click Asset Library.
- In the Shapes category, double-click Cube to add it to the Asset Panel.
- Click Asset Library to go back to the World Editor.
- Double-click the Cube to open the Asset Node Map.
- In the Node Category panel on the left, click Advanced category to expand it.
- Drag the Shop Item Placeholder node to the grid.
- In the Options panel on the right and in the Shop ID field, type a desired ID.
This ID must match a Coin Shop Button’s shop ID
The Coin Shop Button allows the player to purchase and select a Character or Object in the game.
To add a Coin Shop button to a UI Screen:
- In a UI Editor, and in the Objects category in the Asset panel, drag a Coin Shop Button to the grid.
- If needed, drag the sides and corners to resize the button.
- In the Options panel on the right and in the Asset field square, click the Edit button to open the Asset Manager.
- In the Asset Manager window and in the left panel, select the asset you want this button to purchase.
- In the right panel, scroll down and click Save to close the Asset Manager window.
- In the Shop ID field, type a Shop ID that matches a Placeholder Asset’s Shop ID.
- In the Price field, enter the amount of Coins or Points you want the player to spend on an asset.
The Coin Shop Button contains 4 attribute categories that make up its appearance during the following occurrences:
|Unselected||The player has yet to interact with the button.|
|Selected||The button is toggled or enabled and its asset will appear in the game when the Placeholder Asset spawns.|
|Locked||Unable to be selected. Requires a purchase to unlock.|
|Unlocked||The player is able to interact with the button to select its associated asset.|
To change the button’s appearance, drag a PNG image from your computer to an Animation attribute field.
Shop Item Attributes
The Shop Item attribute category allows you to define which asset the button will unlock as well as the currency and price of the asset. This attribute category contains the following:
|Asset||The asset that will appear in the game after it has been unlocked and selected.|
|Shop ID||Enter an ID that matches a Placeholder Asset Shop ID.|
|Price||Enter the amount of coins or points required to purchase the asset.|
|Currency||Select the type of currency required to make the purchase:
|Unlocked by Default||Select to make the button available for free and without any required purchase.|
|Selected by Default||Select to make the button already be selected after the player arrives at the UI Screen.|
|Requires Confirmation||Select to make a confirmation button appear after the player makes a purchase attempt
A Confirmation Button must be present in the UI Editor.
Allows the player to confirm their Coin Shop Button purchase. Only one can exist in a UI Screen.
To add a confirmation button:
- On the UI Editor grid, select a Coin Shop Button.
- In the Options panel on the right, select the Requires Confirmation check-box.
- In the Asset panel on the left, drag a Confirmation Button to the grid.