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.
This is a one shot interaction. So you just need to press your interaction key to interact.
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.
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.
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:
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: