πŸ‘†
Nice Interaction System
  • πŸ‘‹Welcome - Nice Interaction System Documentation
  • πŸ”ŒIntegration in your project
  • πŸŽ₯Video Tutorials - Overview
  • β˜‘οΈEnable/Disable Interaction System
  • πŸšͺHow to make any actor interactable
  • πŸ«₯Add outline to your project and enable it in your map
  • 🌳How to make foliage interactable
  • Trace/Focus Methods
  • πŸ‘†Interaction Methods
  • Save & Load Game
  • ✊Pick up interactable (destroy it) actor/foliage
  • πŸ“©Interaction Notify events for player (Event Dispatchers and Interface)
  • 🌲Foliage PCG instances
  • πŸͺ΅Foliage Destruction effect
  • 🌱Foliage Respawning
  • 🌳Foliage Collision after interaction
  • πŸ«‚Replicated multiplayer interaction
  • πŸ“ͺRedirected interaction
  • πŸ₯‘Interactables in interactable (example Dressers)
  • 🧸Random interactable spawning
  • πŸ”Top Down Mode
  • πŸ“œTrace/Focus Interactable ID whitelist
  • ❌Deny Interactions
  • 🧲Auto Interact (auto pick up)
  • πŸ”ŠPlay Sounds on damaging and destruction
  • ⛏️Custom specific conditions to interact
  • ⌨️Change interaction key [E]
  • πŸ’ Add new interaction widget styles
  • ✈️Seamless Server Travel
  • On switching/possessing pawn/character
  • 🐞Bug Fixes
Powered by GitBook
On this page
  • Single
  • After Duration
  • Hit Points
  • Button Mashing
  • Useful functions and events

Interaction Methods

PreviousTrace/Focus MethodsNextSave & Load Game

You can set the Interaction Method either in an interactable actor in the details tab of AC_MakeInteractable or for foliage in DT_InteractableFoliage.

All interactions and dealt damage are validated by the server. Also the server notifies the player about the interaction. Check Interaction Notify events for player (Event Dispatchers and Interface) for more information about that.

Single

This is a one shot interaction. So you just need to press your interaction key to interact.

After Duration

You need to hold down for a specific duration (You can define it in your interactable by adjusting the variable InteractAfterDuration) your interaction key. After this is done you interact.

Hit Points

This makes the interactable actor or foliage damageable. So to officially interact you (or several players together) need to do damage interactions. So each time they interact, the server reduces the interactable’s hit points. How much damage a player deals is validated server side. The server takes the value of CurrentMeleeDamage (a variable in AC_PC_Interaction) for that. Changing the value of CurrentMeleeDamage has only an effect if the server does that. This could be useful if a player equips for example an axe to then have more damage.

If a foliage instance gets damaged it will be converted to an actor.

Button Mashing

To interact with this method you need to spam or rapidly press the interaction button several times. You can define the behavior with these 2 variables:

Useful functions and events

If you do not have a reference to your player controller and you want to access the interaction player controller component (AC_PC_Interaction), you can do this from everywhere:

And if you want to get access to the interaction game state component (AC_GS_Interaction), you can do this from everywhere:

You can call this function in your AC_PC_Interaction to turn on/off the interaction traces completely:

In an interactable actor you can select the AC_MakeInteractable component. In the details tab scroll down to Event where you can find these events that will get triggered when the respective event happens:

These events are all executed on the server. But the server can then trigger a Multicast event or set a repnotify variable to replicate consequences for all players. Make sure that your actor is set to Replicates in its Class Defaults.

There are some events to adjust the interactable data at runtime in AC_MakeInteractable, also you can add more if needed:

πŸ‘†
Take a look in the Event Graph of AC_MakeInteractable if you try to read text on this image but struggle with that ^^