Endstar LUA API Documentation
|
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 | SetInteractableEnabled (Context instigator, int index, bool isEnabled) |
Sets a specific interactable colliders enabled state. This is internal until fully implemented. | |
void | SetAllInteractablesEnabled (Context instigator, bool isEnabled) |
Sets all the interactable colliders enabled states. This is internal until fully implemented. | |
void | SetIconFromPropReference (Context instigator, PropLibraryReference propLibraryReference) |
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! | |
void | SetAnchorOverride (Context instigator, int index, Vector3 overridePosition) |
void | ClearAnchorOverride (Context instigator, int index) |
void | SetUsePlayerAnchor (Context instigator, int index, bool usePlayerAnchor) |
void | SetHidePromptDuringInteraction (Context instigator, bool value) |
Sets if the interaction prompt should be hidden during an active interaction. | |
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!
void ClearAnchorOverride | ( | Context | instigator, |
int | index ) |
int GetNumberOfInteractables | ( | ) |
Exposes the number of interactable colliders to the Lua environment.
void SetAllInteractablesEnabled | ( | Context | instigator, |
bool | isEnabled ) |
Sets all the interactable colliders enabled states. This is internal until fully implemented.
context | The source context that is triggering this change |
isEnabled | The new enabled state of all the interactable colliders |
void SetHidePromptDuringInteraction | ( | Context | instigator, |
bool | value ) |
Sets if the interaction prompt should be hidden during an active interaction.
instigator | The source context that is triggering this change |
value | True is hidden |
void SetIconFromPropReference | ( | Context | instigator, |
PropLibraryReference | propLibraryReference ) |
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!
instigator | The source context that is triggering this change |
propLibraryReference | Which item should it point to? Nil is acceptable to clear the icon! |
void SetInteractableEnabled | ( | Context | instigator, |
int | index, | ||
bool | isEnabled ) |
Sets a specific interactable colliders enabled state. This is internal until fully implemented.
context | The source context that is triggering this change |
index | The index of the collider you wish to change. Most objects have only a single collider and you can pass in 0 |
isEnabled | The new enabled state of the interactable collider |
void SetInteractionAnimation | ( | Context | instigator, |
int | interactionAnimation ) |
Sets the InteractionAnimation enum on the interactable.
interactionAnimation | Which InteractionAnimation should play when a character interacts with this? |
void SetIsHeldInteraction | ( | Context | instigator, |
bool | isHeldInteraction ) |
If held, it requires the player to hold down the interact key, and upon release cancels the interaction.
isHeldInteraction | Does the key need to be held? |
void SetUsePlayerAnchor | ( | Context | instigator, |
int | index, | ||
bool | usePlayerAnchor ) |
Calls "OnInteractionStopped" on the Interactable objects Lua Script and informs the interactor (usually a character) that it is done as well.
context |