16 lines
379 B
Markdown
16 lines
379 B
Markdown
|
|
Generic:
|
||
|
|
AudioStream
|
||
|
|
Positional:
|
||
|
|
AudioStream2D
|
||
|
|
AudioStream3D
|
||
|
|
|
||
|
|
`
|
||
|
|
```
|
||
|
|
var text_appearing_duration = 1.2 # value is in seconds
|
||
|
|
var sound_max_length := audio_stream_player.stream.get_length() - text_appearing_duration
|
||
|
|
var sound_start_position := randf() * sound_max_length
|
||
|
|
audio_stream_player.play(sound_start_position)
|
||
|
|
tween.finished.connect(audio_stream_player.stop)
|
||
|
|
|
||
|
|
|
||
|
|
```
|