This contains the source code documentation of the class DialogicAutoAdvance
.
DialogicAutoAdvance
Inherits: RefCounted
This class holds the settings for the Auto-Advance feature. Changing the variables will alter the behaviour of Auto-Advance.
Description
Auto-Advance is a feature that automatically advances the timeline after a player-specific amount of time. This is useful for visual novels that want the player to read the text without having to press. Unlike DialogicAutoSkip, Auto-Advance uses multiple enable flags, allowing to track the different instances that enabled Auto-Advance. For instance, if a timeline event forces Auto-Advance to be enabled and later disables it, the Auto-Advance will still be enabled if the player didn't cancel it.
Properties
Name | Type | Default |
---|---|---|
autoadvance_timer | Timer | new() |
fixed_delay | float | 1.0 |
delay_modifier | float | 1.0 |
per_word_delay | float | 0.0 |
per_character_delay | float | 0.1 |
ignored_characters_enabled | bool | false |
ignored_characters | Dictionary | {} |
await_playing_voice | bool | true |
override_delay_for_current_event | float | -1.0 |
enabled_until_next_event | bool | false |
enabled_forced | bool | false |
enabled_until_user_input | bool | false |
Methods
Returns | Method |
---|---|
void | start ( ) |
bool | is_advancing ( ) |
float | get_time_left ( ) |
float | get_time ( ) |
bool | is_enabled ( ) |
float | get_progress ( ) |
Signals
No description available.
signal toggled ( enabled
: bool )
No description available.
Property Descriptions
No description available.
No description available.
No description available.
No description available.
No description available.
var ignored_characters_enabled = false
No description available.
No description available.
var await_playing_voice = true
No description available.
var override_delay_for_current_event = -1.0
No description available.
var enabled_until_next_event = false
If true, Auto-Advance will be active until the next event. Use this flag to create a temporary Auto-Advance mode. You can utilise override_delay_for_current_event
to set a temporary Auto-Advance delay for this event. Stacks with enabled_forced
and enabled_until_user_input
.
If true, Auto-Advance will stay enabled until this is set to false. This boolean can be used to create an automatic text display. Stacks with enabled_until_next_event
and enabled_until_user_input
.
var enabled_until_user_input = false
If true, Auto-Advance will be active until the player presses a button. Use this flag when the player wants to enable Auto-Advance. Stacks with enabled_forced
and enabled_until_next_event
.
Method Descriptions
No description available.
No description available.
func get_time_left ( ) ⇒ float
No description available.
No description available.
Returns whether Auto-Advance is currently considered enabled. Auto-Advance uses three different enable flags: - enabled_until_user_input (becomes false on any dialogic input action) - enabled_until_next_event (becomes false on each text event) - enabled_forced (becomes false only when disabled via code) All three can be set with dedicated methods.
Returns the progress of the auto-advance timer on a scale between 0 and 1. The higher the value, the closer the timer is to finishing. If auto-advancing is disabled, returns -1.