document alt handling

This commit is contained in:
2024-06-25 11:35:59 -06:00
parent 4a37e3054d
commit 835fd00907

View File

@@ -167,14 +167,17 @@
null))
((objectWith trackKey start end alts)
(case (dictGet altIdx "$actorName $text")
// First time playing, use first alt:
(null
(dictSet altIdx "$actorName $text" 0)
(set customCC ->:Void {})
(director.playVoiceTrack (dictGet voiceTracks trackKey) 1 start end cc))
// All alts played, loop back to first alt:
((when (>= idx alts.length) idx)
(dictSet altIdx "$actorName $text" 0)
(set customCC ->:Void {})
(director.playVoiceTrack (dictGet voiceTracks trackKey) 1 start end cc))
// Play next alt
(idx
(let [alt (nth alts idx)
start alt.start