Hey there, i would do this a bit different. Here is what i came up with:
- PickUpActor Blueprint
- MyCharacter Blueprint
- Door Blueprint
I will just show you the BPs Event Graphs:
Character only has a new Variable called “PickUpCounter”.
PickUpActor has a Box for collision and the Overlap Event for it:
The door has an event for opening the door. In my scene, this will only print a text because i don’t want to setup a door for that.
Put the door BP into your scene, select it and open the LevelBlueprint. Create a reference of that door with right click (you still need the door selected). Now do the following:
That should do all the magic. You can use the Counter in your HUD to display it too (: