Textdisplay Spoken Cinematic
Display a spoken dialogue using TextDisplay during a cinematic
字段
| 字段 | 类型 | 默认值 | 描述 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
segments | List<TextDisplaySpokenSegment> | empty | —
|
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
startFrame | Int | 0 | — |
endFrame | Int | 0 | — |
text | Var<String> | — | The text to display to the player.占位符颜色多行 |
positionVar<Position>ORIGINscaleVar<Double>1.0showBackgroundVar<Boolean>truebackgroundColorVar<Color>speakerBackgroundColorVar<Color>textOpacityVar<Double>1.0viewRangeVar<Double>64.0appearanceDelayVar<Duration>ofSeconds(1)animationDurationVar<Duration>ofSeconds(2)TypeWriter 通用字段(criteria, speaker)
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
criteria | List<Criteria> | empty | — |
speaker | Ref<SpeakerEntry> | — | — |
How to use it
Add this entry to a cinematic page and draw one segment per line of speech. Each segment has startFrame, endFrame and a text.
- Timing. At the start of a segment the text waits
appearanceDelay, then types out overanimationDuration. Both are converted at 20 frames per second. - Position.
positionfixes the text in the world. When it is empty, the text appears 3 blocks in front of the player at eye height. - Speaker. The speaker name is shown above the text and the speaker sound plays at the start of each segment.
- The display always faces the camera and uses
backgroundColorfor both the name and the text. - The cinematic does not move the player; the text is not interactive.