TriggerActionLua
Functions
SetInteractionName
function TriggerActionLua.SetInteractionName((string)Interaction Name)
Parameter | Type | Description |
---|---|---|
Interaction Name | string |
New Interaction name |
TriggerActionLua.SetInteractionName
Sets the name of the trigger interaction
Example
self.actionLua.SetInteractionName("Test")
StopTrigger
function TriggerActionLua.StopTrigger()
TriggerActionLua.StopTrigger
Stops running the trigger.
Example
self.actionLua.StopTrigger()
OverrideCanAction
function TriggerActionLua.OverrideCanAction((function)Overriding Function)
Parameter | Type | Description |
---|---|---|
Overriding Function | function |
What function to override the CanAction method with. |
TriggerActionLua.OverrideCanAction
Sets what function overrides the CanAction call. The CanAction call is called by the game to check if the trigger can be used. Make sure the function returns a bool that is true if the trigger can be used or false if the trigger cannot be used.
Example
self.actionLua.OverrideCanAction(Function)
OverrideShowInteractionKey
function TriggerActionLua.OverrideShowInteractionKey((function)Overriding Function)
Parameter | Type | Description |
---|---|---|
Overriding Function | function |
What function to override the ShowInteractionKey method with. |
TriggerActionLua.OverrideShowInteractionKey
Sets what function overrides the ShowInteractionKey call. This call is used to see if the trigger should show the 'press E to interact' message on the screen. Make sure the function returns a bool that is true if the trigger should show or shouldn't show the message.
Example
self.actionLua.OverrideShowInteractionKey(Function)
OverrideActionUpdate
function TriggerActionLua.OverrideActionUpdate((function)Overriding Function)
Parameter | Type | Description |
---|---|---|
Overriding Function | function |
What function to override the ActionUpdate method with. |
TriggerActionLua.OverrideActionUpdate
Sets what function overrides the ActionUpdate call. This call is called every frame the trigger is being used. The action will only stop when self.actionLua.StopTrigger()
is called.
Example
self.actionLua.OverrideActionUpdate(Function)
OverrideStartAction
function TriggerActionLua.OverrideStartAction((function)Overriding Function)
Parameter | Type | Description |
---|---|---|
Overriding Function | function |
What function to override the StartAction method with. |
TriggerActionLua.OverrideStartAction
Sets what function overrides the StartAction call. This call is called the first frame the trigger started being used. The trigger will only stop being used when self.actionLua.StopTrigger()
is called.
Example
self.actionLua.OverrideStartAction(Function)
OverrideEndAction
function TriggerActionLua.OverrideEndAction((function)Overriding Function)
Parameter | Type | Description |
---|---|---|
Overriding Function | function |
What function to override the EndAction method with. |
TriggerActionLua.OverrideEndAction
Sets what function overrides the EndAction call. This call is called when the trigger has finished being used.
Example
self.actionLua.OverrideEndAction(Function)