Comment on page
Create a Collectable
In this how-to guide, we are going to create a collectable system for our game where players must collect small artifacts in the game world to unlock a reward. This guide will walk you through implementing collectables in both LootLocker and in-game.
To start, lets navigate to the Collectables menu by clicking
Collectablesin the Game Systems side bar menu.
To create a new Collectable, click the
Add Collectablebutton in the top right corner, give your Collectable a name and click
Create Collectable. This will create the Collectable and take us to our Collectable's page.
Lets set a reward for collecting all of the artifacts in our game. To do this, click
Add Rewardin the Collectable Rewards section and select an Asset from the modal. We have already set up Assets in our game, but if you haven't you can learn how do that in the Create Your First Asset how-to guide.
Since we have selected multiple rewards, and want to give all of the rewards to the player upon completing the Collectable, we will also tick the
Grants Allbox next to the Collectable name. This will grant all rewards to the player, and not just select one randomly.
With our reward now set, we can start to define the individual Collectables that the player must collect to receive the reward. In our game, all Artifacts are found on one level, so we only need to create a single Item Group. If your game is more advanced you can use Item Groups to create a more advanced tiered Collectable system where each Item Group also has its own reward. To create a new Item Group, click the
Since we will not need to set a separate reward for this group, we can move forward and create each Collectable Item. The Collectable Item is the individual item in-game that the player must collect. Lets create our first by clicking
Add Itemin the Item Group we just created. We will create 3 items and name them
artifact-3which will be the name of each specific artifact that the player will need to collect to successfully complete this group, and thus complete the entire Collectable system. Here's how it looks all set up.
If your game calls for it, you can even add rewards for collecting each Item as well by clicking on
Expandin each Item's row and then
Add Itemin the expanded view.
You have now set up Collectables in LootLocker and are ready to implement them in your game.