TK_Interactable - golden-coconut-studio/TikiAdventuresWiki GitHub Wiki

TK_InteractableObject is a class for blueprints that allows a character to interact with said blueprint. It has a couple of functionalities:


INTERACT this function does 2 things:

 It calls the Activate() Function of an activatable object that you've defined on the blueprint. Activatables() do 
 predetermined things when their Activate() function is called. 

 It calls its own blueprint event called "BlueprintAbilityEffect" this is a custom event where designers can add any 
 additional functionality to an interactable. For example, if the interactable were to be a chest, you could call
 its animation to open up, and spawn some loot.

 Lastly, you have a boolean called canOnlyInteractOnce, that will make it so you can only call the interact function 
 ONCE. (Like a permanent button).

Blueprint Examples:

Calling Interact through collision (you can call it wherever you want though):

Calling the custom event:

Visibility while in the details:


USING PROMPTS

additionally, the interactable has the capability of using prompts. If you add a TK_Prompt, the interactable will automatically find it (NOTE: only 1 prompt will be detected, so pay that in mind when adding multiple prompts). From here you can call the prompt functions ActivatePrompt and DeactivatePrompt() as you please, like in the follow example:

THE ONLY THING INTERACTABLES DO WITH PROMPTS:

All it does is look if canOnlyInteractOnce is set to true. If so, it calls the DisablePromptCompletely() function, which makes sure the prompt cannot be made visible again.