Base class for building triggers. Transitions to Triggered state once the input meets or exceeds the actuation threshold.
Editor Properties: (see get_editor_property/set_editor_property)
actuation_threshold(float): [Read-Write] Actuation Threshold
last_value(InputActionValue): [Read-Write] Value passed to UpdateState on the previous tick. This will be updated automatically after the trigger is updated.
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
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.
[Read-Only] Value passed to UpdateState on the previous tick. This will be updated automatically after the trigger is updated.
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.