Endstar LUA API Documentation
Loading...
Searching...
No Matches
Interactable Class Reference

This class allows a player to Interact with the object by pressing the interact key. What it does when interacted with is up to the lua script! In the future, NPCs can also be told to interact with these objects! More...

Public Member Functions

int GetNumberOfInteractables ()
 Exposes the number of interactable colliders to the Lua environment.
 
void SetInteractionAnimation (Context instigator, int interactionAnimation)
 Sets the InteractionAnimation enum on the interactable.
 
void SetIsHeldInteraction (Context instigator, bool isHeldInteraction)
 If held, it requires the player to hold down the interact key, and upon release cancels the interaction.
 
void StopInteraction (Context instigator, Context targetInteractor)
 Calls "OnInteractionStopped" on the Interactable objects Lua Script and informs the interactor (usually a character) that it is done as well.
 
void SetIconFromPropReference (Context instigator, LibraryReferenceClass libraryReference)
 This allows the player's interaction prompt to show the icon of an object next to it, indicating that the object is required, such as a key on a locked door!
 

Detailed Description

This class allows a player to Interact with the object by pressing the interact key. What it does when interacted with is up to the lua script! In the future, NPCs can also be told to interact with these objects!

Member Function Documentation

◆ GetNumberOfInteractables()

int GetNumberOfInteractables ( )

Exposes the number of interactable colliders to the Lua environment.

Returns

◆ SetIconFromPropReference()

void SetIconFromPropReference ( Context instigator,
LibraryReferenceClass libraryReference )

This allows the player's interaction prompt to show the icon of an object next to it, indicating that the object is required, such as a key on a locked door!

Parameters
instigatorThe source context that is triggering this change
libraryReferenceWhich item should it point to? Nil is acceptable to clear the icon!

◆ SetInteractionAnimation()

void SetInteractionAnimation ( Context instigator,
int interactionAnimation )

Sets the InteractionAnimation enum on the interactable.

Parameters
interactionAnimationWhich Endless.Gameplay.LuaEnums.InteractionAnimationInteractionAnimationshould play when a character interacts with this?

◆ SetIsHeldInteraction()

void SetIsHeldInteraction ( Context instigator,
bool isHeldInteraction )

If held, it requires the player to hold down the interact key, and upon release cancels the interaction.

Parameters
isHeldInteractionDoes the key need to be held?

◆ StopInteraction()

void StopInteraction ( Context instigator,
Context targetInteractor )

Calls "OnInteractionStopped" on the Interactable objects Lua Script and informs the interactor (usually a character) that it is done as well.

Parameters
context