unreal.InputTrigger

class unreal.InputTrigger(outer=None, name='None')

Bases: unreal.Object

Base class for building triggers. Transitions to Triggered state once the input meets or exceeds the actuation threshold.

C++ Source:

  • Plugin: EnhancedInput

  • Module: EnhancedInput

  • File: InputTriggers.h

Editor Properties: (see get_editor_property/set_editor_property)

  • actuation_threshold (float): [Read-Write] Actuation Threshold: Point at which this trigger fires

  • last_value (InputActionValue): [Read-Write] Last Value: Value passed to UpdateState on the previous tick. This will be updated automatically after the trigger is updated.

property actuation_threshold

[Read-Write] Actuation Threshold: Point at which this trigger fires

Type

(float)

get_trigger_type() TriggerType
Changes the way this trigger affects an action with multiple triggers:

All implicit triggers must be triggering to trigger the action. If there are any explicit triggers at least one must be triggering to trigger the action.

Return type

TriggerType

is_actuated(for_value) bool
  • Is the value passed in sufficiently large to be of interest to the trigger.

  • This is a helper function that implements the most obvious (>=) interpretation of the actuation threshold.

Parameters

for_value (InputActionValue) –

Return type

bool

property last_value

[Read-Only] Last Value: Value passed to UpdateState on the previous tick. This will be updated automatically after the trigger is updated.

Type

(InputActionValue)

update_state(player_input, modified_value, delta_time) TriggerState
This function checks if the requisite conditions have been met for the trigger to fire.
Returns Trigger State None - No trigger conditions have been met. Trigger is inactive.

Trigger State Ongoing - Some trigger conditions have been met. Trigger is processing but not yet active. Trigger State Triggered - All trigger conditions have been met to fire. Trigger is active.

Parameters
Return type

TriggerState