Initial Setup (updated 2nd August 2018)
In your vault, find the Padlock and Keypad pack and click ‘Create Project’.
Right click the ‘PadlockAndKeypadPack’ folder and click ‘Migrate’. The migrate option may be under ‘Asset Actions’. Select the content folder of the project you want to use the pack in.
Open you player character blueprint and in the top toolbar, click on ‘Class Settings’.
In the class options panel (on the right hand side) add the BPI_Interact interface.
Right click on an empty space of the player blueprint and search for ‘Interact Function’. Connect this up to an input event. In this example, F was used.
One of the features of the padlock is the padlock zooms to be in front of the character. For the padlock to move to the right place there needs to be a reference mesh in the character blueprint. Drag and drop the padlock mesh into the component list and attach it to the camera. Then you can move/rotate/scale the padlock to where you would like.
With the padlock mesh selected, disable collision and untick the ‘Visible’ checkbox.
With the padlock selected, add a tag to the mesh and name it ‘ReferenceMesh’.
Changing the Code of the Padlock
Changing the code of the padlock is very simple. Just drag the padlock blueprint out of the content browser and into your level. With the padlock selected, change the Padlock Code variable found in the details panel. The code is limited to 4 digits. You can also tick the ‘Randomise Padlock Code’ check box to get a random code.
If you require any additional support with this blueprint or to report bugs you can contact me by email at email@example.com.