Last lesson we created our first collectable – we could walk up to it and pick it up, but other than disappearing it didn’t do anything. In this lesson, we will begin counting the collectables we pick-up.

When creating our collectable we created a blueprint. This time we are going to alter an existing blueprint – our player character blueprint. In the Content Drawer search and select “BP_ThirdPersonCharacter”

In the player character blueprint we can see all the different instructions attached to our character. Be careful not to remove anything here – you character might become unable to move, jump or adjust the camera.


On the left side, add a variable and name it “[items]collected”. I called mine KeysCollected. Change this variable from a Boolean to an Integer. This means the variable will track whole numbers.

Right-click a blank space in the Event Graph. Type and select “Add Custom Event”. Name this event “[Item]PickUp”. Remember this name as you will need to use it later.


From the Variables menu on the left drag your Interger into the event graph and select “Get [Items]Collected”. Drag from the right arrow of the “[Items] Collected” variable and release. Type and select “Incremental Int”. This will increase our collectable count by one when activated.

From the node we just created, drag the top arrow into a blank space in the event editor. Type and select “Print String”.

Connect the mint green arrow from the Incremental Int node to the magenta arrow of the Print String node.

Connect the top left arrow of the Incremental Int node to the white arrow of the “[Item]PickUp event”. When completed, our Event Graph should look like this.
Press compile in the top left corner. We are now done with this blueprint. Let’s return to our collectable object blueprint.


In our collectable object blueprint, drag out from “As BP Third Person Character” and release. Type and select “[Item] Pick Up”, this is the function you named earlier.

Connect the left white arrow of the newly created node to the right white arrow of the Destroy Actor node. Click compile and test. When you pick up your collectable you should see a “1” in the top left corner. If you place multiple collectables in the scene this number will increase further.