πŸ‘†
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

Pick up interactable (destroy it) actor/foliage

PreviousSave & Load GameNextInteraction Notify events for player (Event Dispatchers and Interface)

If you select in your intractable actor the AC_MakeInteractable component you can set in the Details tab under Interacting -> Destruction bDestroyOnInteraction to true.

Or for foliage you can set in DT_InteractableFoliage under Interacting -> Destruction bDestroyOnInteraction to true.

The image below shows that and additionally how you can add a pick up sound effect that is only playing locally on the interacting player:

(for more information check Play Sounds on damaging and destruction)

If your game is multiplayer the server validates the interaction and if two players try to pick up (interact) an item at the same time only the player that was quicker will get a notification in AC_MakeInteractable. This notifier is still running on the server: Server on Interaction. So the server could give an item to the player. You would need to implement this yourself since this interaction system does not contain any inventory system, it is only an interaction system that manages the interaction, destruction and server validated notify on the player that interacted / picked up the interactable.

Check Interaction Notify events for player (Event Dispatchers and Interface) to learn how to add these notify events. Then you can add for example this to your character/pawn or player controller:

Because this is called on the server and you want something to be called only on the player you can call an event that you set to β€˜Run on owning Client’ in the details tab under β€˜Replicates’.

✊