rdInst Tutorial 2.4 – Using AutoPickups


You can quickly and easily turn any StaticMesh Actors in your level into PickUps, with all the highlighting and overlapping handled for you – you receive events when a pickup has been either picked up, looked at, or no longer looking at.

This tutorial creates some overlap type pickups and some LookAt pickups with various highlighting.


Step 1. Create a new level with the FirstPerson GameMode

Firstly, create a new level using the FirstPerson template. Either create a new project with that content selected, or add the content if your project from the Content Browser.

Then just add a Basic Level and set the GameMode to FirstPerson.


Step 2. Add the StaticMeshes to the level

Here we’re using some assets from the Convenience Store Asset Pack laid out on a bench, some drink cans for overlap type pickups and some other junk food as LookAt pickups:


Step 3. Set the Pickup Proxy Settings for the actors

Now we need to setup the pickups for the items on the benches. Our inventory system only cares about canned drinks as a whole, so all the drinks can have a single Pickup ID and have the same settings, so firstly select all the drinks, then right-click and select “rdInst->Proxy Settings” from the menu.

In the window that opens, set the Proxy Type to “Pickup”, the Pickup Type to “Overlap”, set the Highlight to “Outline”,”Solid Color” and set a color you want – tick the “All Instances” box near the top and set a highlight and pickup distance that suits you (0 = use the defaults). Set the ID to “1”.

For the LookAt (Interactive) Pickups, set each one the same, but with “Interact” as the Pickup Type, “LookAt Outline” for the Highlight Type and a variety of Highlight Styles. Initially, just select one of each type of mesh together and set these general details, then go through each type and give them a unique ID and Highlight Style/Colors/thickness.

Note: If you choose values greater than 1.0 for the colors, they glow – 5.0 -> 10.0 can look good.


Step 4. Create a HUD

A sight can be useful for testing the LookAt Pickups, and we want to display what inventory we have collected, so here we make a simple HUD.

Just create a new Custom Widget and add some default int variables – one for each of the inventory types (e.g. numDrinks,numChips,numNuts (not numbNuts),numPopcorn and numBars).

Add the Text along the top, with the Amount blocks, hook them up to their matching variable.

Also add a Text block with the text “Press ‘E’ to Interact” and set its visibility to hidden (we’ll show that when LookAt Pickups are looked at).


Step 5. Create an Inventory Controller Blueprint

Now create a new Blueprint subclassed from Actor, call it something like “BP_InventoryController” as it’s going to be handling our inventory.

Add a variable called “hud” with the variable type as the HUD from Step 4 (this gets filled from the PlayerCharacter BP in step 6.). Then add the same variables for each inventory type as you did to the HUD. Also add a Boolean variable called “lookingAtPickup”

Now add a function called “HandleInteract” – this gets called from the FirstPersonCharacter Blueprint when the E key is pressed. Add the code below. The call to rdPickupCurrent handles finding the correct pickup and checks.

Now Add the following code to the BeginPlay event – it handles the Pickup Delegate events, increments the correct pickup items and updates the HUD.


Step 6. Modify the FirstPerson Blueprint

We need to show the HUD from the FirstPerson BeginPlay, we also need the “E” key to trigger picking up the currently highlighted Pickup which is best done from here, so open up the BP_FirstPersonCharacter Blueprint, add a new variable called “inventoryController”, set the variable type to the Controller Blueprint from Step 5. Then add a new event for the Key “E” and add the code for that and the BeginPlay event:


Step 7. Enable Auto-Instancing

Now just select the “rdInst Settings” actor in the outliner and in the details panel, tick “Enable Auto-Instancing” and “Process Asset Proxy Settings”.


Step 8. Done, play the level

Now just play the level and move close to the overlap pickups, and look at the LookAt pickups – press E to pick up.