Skip to content

Commit 8891fdb

Browse files
authored
Create manual-advance.md.
1 parent 02bf4f0 commit 8891fdb

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

documentation/manual-advance.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<div class="header-banner purple">
2+
<div class="header-label purple">Manual-Advance</div>
3+
</div>
4+
5+
*Manual-Advance allows your player to advance the timeline by using input mapped to `dialogic_default_action` (Project Settings → Input Map).*
6+
7+
## 📜 Content
8+
[toc]
9+
10+
## 1. What is Manual-Advance?
11+
12+
Manual-Advance is a feature in Dialogic that allows players to progress through the timeline *with* inputs! It's enabled by default: The player clicks, and the timeline moves down its stack of events.
13+
14+
## 2. Changing Manual-Advance via Code
15+
16+
Dialogic's Manual-Advance class can be easily accessed via the Inputs subsystem and allows you to change Manual-Advance during your game. It also has a number of settings not exposed to the dialogic interface.
17+
18+
All of this functionality lives in `Dialogic.Inputs.Manual-Advance` an `DialogicManualAdvance` object.
19+
We can limit the player from interacting with the timeline to display a scripted timeline section.
20+
21+
# 2.1 Limit Player Inputs via Code
22+
It's straightforward to script this behaviour. The following snippet showcases this:
23+
24+
```gdscript
25+
Dialogic.Inputs.auto_advance.disabled_until_next_event = true
26+
```
27+
28+
In Dialogic, both Manual-Advance and Auto-Advance share the concept of `system`: The system is the feature itself, in this case Manual-Advance. You can prevent players from advancing the timeline:
29+
30+
```gdscript
31+
# No more inputs for you, player.
32+
Dialogic.Inputs.auto_advance.system_enabled = false
33+
```
34+
35+
Additionally, you can call the method `Dialogic.Inputs.auto_advance.is_enabled()` to check if the player can manually advance.

0 commit comments

Comments
 (0)