unreal.InputTriggerHold

class unreal.InputTriggerHold(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: InputTriggerTimedBase

UInputTriggerHold

Trigger fires once input has remained actuated for HoldTimeThreshold seconds. Trigger may optionally fire once, or repeatedly fire.

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

  • affected_by_time_dilation (bool): [Read-Write] Affected by Time Dilation: Should global time dilation be applied to the held duration? Default is set to false.

    If this is set to true, then the owning Player Controller’s actor time dialtion will be used when calculating the HeldDuration. see: UInputTriggerTimedBase::CalculateHeldDuration see: AWorldSettings::GetEffectiveTimeDilation

  • held_duration (float): [Read-Write] Held Duration: How long have we been actuating this trigger?

  • hold_time_threshold (float): [Read-Write] Hold Time Threshold: How long does the input have to be held to cause trigger?

  • is_one_shot (bool): [Read-Write] Is One Shot: Should this trigger fire only once, or fire every frame once the hold time threshold is met?

  • 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.

  • should_always_tick (bool): [Read-Write] Should Always Tick: Decides whether this trigger ticks every frame or not.

    • This WILL affect performance and should only be used in specific custom triggers.

property hold_time_threshold: float

[Read-Write] Hold Time Threshold: How long does the input have to be held to cause trigger?

Type:

(float)

property is_one_shot: bool

[Read-Write] Is One Shot: Should this trigger fire only once, or fire every frame once the hold time threshold is met?

Type:

(bool)