In this tutorial we will make a new Interactive Blueprint Actor and go over some info.
First create a new Actor:
Then add a cube or a custom mesh and set the Collision Preset to Custom and select “InteractiveActor” as the Object Type. This will enable/disable the “Press E to Interact” prompt on the HUD when the player looks at it.
After that, go to Class Settings and add the BPI_Interact interface and Compile.
And lastly, in the Event Graph, call the Event and add some logic you want this Actor to do, in this case it’s gonna say Hello using the Print String when interacted with.
You can tell it to do lots of different things. Start dialogue with NPC’s, move an elevator, open a door, turn on a light, start some event in the level, add health to the player, etc.
This can even be applied to NPC’s, for an example of how to interact with NPC’s, you can check the link bellow, basically it opens any Widget when interacted with. It’s a simple way of starting a dialogue system if you want to make one, or like a merchant of some sort, or remove the widget part and tell it to say something by playing a sound instead, etc.