1. Home
  2. Docs
  3. Starter Guides
  4. Inventory System
  5. Show Interaction Text

Show Interaction Text

Default Function "ShowInteractionText"

The interaction text function is only there as an example. It can cause problems if you remove the camera.

It looks complex but it only checks for an actor and sets the widget visible if its not already.

At the end it will update the widget text and location. 

Intaction Interface

All world items have the I_Interaction_Inventory implemented. You can check with a linetrace for items and if they implement this interface.

Get Intaction Text

The interaction text will be defined by the actor.
Items in the world will format the text to
“{ItemAmount}x {ItemName}”

You can expand the interface to expose the amount and name directly to format your text or edit the existing formation to your desire.

Use the Text to update your widget.

Get Intaction Text Location

The location will be defined by the actor in world space.

You can project the location to screen to adjust the widget location.

How can we help?