SInteractedActor class overview - whoisEllie/Project-Isolation GitHub Wiki

SInteractedActor

Overview

SInteractedActor is the second half of the robust interaction system provided with isolation-game. When interacting with a child of SInteractionActor, it will delegate a call to a child of SInteractedActor, which then processes the request and implements any necessary logic.


Functions

  • void Interacted(); - The default Interacted function, called from SInteractionActor when it receives an Interaction from SCharacter. It calls OnInteracted();

  • void OnInteracted(); - A blueprint-implementable function called when this actor has been interacted with through a child of an SInteractionActor.


Uses

Much like SInteractionActor, on its own, SInteractedActor is largely useless. When called from a child of SInteractionActor, it has the power to do almost anything thanks to the blueprint implementation of the function call. It is recommended to do any blueprint logic after the interaction event has been received. In Project Isolation, a weapons dispenser functions with this dual system, and performs a check to see if the player has enough money after an interaction has already been received, and only spawns a weapon of this check is passed.