2024-06-05 16:23:48 +02:00
Tree("Root") {
2024-07-19 19:56:36 +02:00
Composite(Sequence) {
2025-01-27 14:58:23 +01:00
BTC.InitializeSpeechManager()
BTC.SetSpeechRecognitionLanguage("it-IT")
BTC.SetVoiceName("it-IT-FabiolaNeural")
2024-12-04 17:23:07 +01:00
2025-01-22 15:45:15 +01:00
Composite(Race) {
Composite(Sequence) {
// Error in Speech Service: Cancel BTC Trees
BTC.SpeechErrorOccured()
BTC.SetBool("error")
}
2024-12-04 17:23:07 +01:00
2025-01-22 15:45:15 +01:00
Composite(Sequence) {
2025-01-31 17:04:46 +01:00
//RunTree("32_Grotto_Story_B_Grotto_Intro")
2025-01-22 15:45:15 +01:00
2025-02-03 17:40:54 +01:00
//RunTree("32_Grotto_Kueche_Intro")
2025-01-31 14:09:46 +01:00
//RunTree("32_Grotto_Kueche_Zwiebeln_schneiden")
//RunTree("32_Grotto_Kueche_alles_gefunden")
2025-02-03 17:40:54 +01:00
//RunTree("32_Grotto_Kueche_Interesse_Kochen")
2025-01-22 15:45:15 +01:00
//RunTree("32_Grotto_Kueche_Kochen_Anzahl")
//RunTree("32_Grotto_Kueche_Zusammen_Kochen")
2025-02-03 17:40:54 +01:00
RunTree("32_Grotto_Kueche_Parmigiano")
2025-01-22 15:45:15 +01:00
//RunTree("32_Grotto_Im_Grotto_Essen_Intro")
}
}
Composite(Sequence) {
BTC.CompareBool("error")
// Error Handling
BTC.AbortSpeechEventListener()
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
BTC.Set("TextMeshPro.GO.Option1Button", "text", "Restart")
BTC.Show("GO.GO.Option1Button")
BTC.Run("NamedEventTrigger.GO.Option1Button")
BTC.Hide("GO.GO.Option1Button")
}
2024-09-16 20:37:29 +02:00
}
}
2024-12-04 17:23:07 +01:00
Tree("32_Grotto_Story_B_Grotto_Intro") {
2024-09-16 20:37:29 +02:00
Composite(Sequence) {
2025-01-27 14:58:23 +01:00
BTC.Run("AudioSource.AUDIO.StoryBGrottoIntro1")
BTC.Run("AudioSource.AUDIO.StoryBGrottoIntro2")
2024-12-04 17:23:07 +01:00
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Intro.3")
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Intro.4")
BTC.StartSpeechIntentRecognition()
Composite(Race) {
// -- Race 1: User sagt etwas
Composite(Selector) {
Composite(Sequence) {
BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized()
BTC.ClearPossbileSpeechIntents()
}
// Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
}
}
// -- Race 2: User sagt nichts
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
}
}
2025-01-27 14:58:23 +01:00
BTC.Run("AudioSource.AUDIO.StoryBGrottoIntro6")
2024-12-04 17:23:07 +01:00
// --- Story B Grotto - Telefonat ---
2025-01-27 14:58:23 +01:00
BTC.Run("AudioSource.AUDIO.StoryBGrotto1Telef")
2024-12-04 17:23:07 +01:00
2025-01-27 14:58:23 +01:00
BTC.SynthesizeText("Ciao Francesca. Sei già arrivata?")
2024-12-04 17:23:07 +01:00
BTC.SpeechOutputEnded()
2025-01-27 14:58:23 +01:00
BTC.Run("AudioSource.AUDIO.StoryBGrotto3Telef")
2024-12-04 17:23:07 +01:00
2025-01-27 14:58:23 +01:00
BTC.SynthesizeText("Oh, che bello, e chi è?")
2024-12-04 17:23:07 +01:00
BTC.SpeechOutputEnded()
2025-01-27 14:58:23 +01:00
BTC.Run("AudioSource.AUDIO.StoryBGrotto5Telef")
2024-12-04 17:23:07 +01:00
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Telefonat.6")
BTC.StartSpeechIntentRecognition()
Composite(Race) {
// -- Race 1: User sagt etwas
Composite(Selector) {
Composite(Sequence) {
BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized()
BTC.ClearPossbileSpeechIntents()
}
// Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
}
}
// -- Race 2: User sagt nichts
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
}
}
// --- Story B Grotto - Begruessung ---
2025-01-27 14:58:23 +01:00
BTC.SynthesizeText("Ciao, che bello che accompagni Francesca. Com'è andato il viaggio?")
2024-12-04 17:23:07 +01:00
BTC.SpeechOutputEnded()
// --- Story B Grotto - Antwort_Reise ---
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Reise.1")
BTC.StartSpeechIntentRecognition()
Composite(Race) {
// -- Race 1: User sagt etwas
Composite(Selector) {
Composite(Sequence) {
BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized()
BTC.ClearPossbileSpeechIntents()
}
// Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
}
}
// -- Race 2: User sagt nichts
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
}
}
2025-01-27 14:58:23 +01:00
BTC.SynthesizeText("Ti piace la Mesolcina?")
2024-12-04 17:23:07 +01:00
BTC.SpeechOutputEnded()
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Reise.5")
BTC.StartSpeechIntentRecognition()
Composite(Race) {
// -- Race 1: User sagt etwas
Composite(Selector) {
Composite(Sequence) {
BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized()
BTC.ClearPossbileSpeechIntents()
}
// Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
}
}
// -- Race 2: User sagt nichts
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
}
}
2025-01-27 14:58:23 +01:00
BTC.SynthesizeText("Io non vorrei vivere in nessun altro posto al mondo! Purtroppo oggi non ci posso essere nel grotto. Aiuti tu Francesca in cucina o preferisci aspettarla nella sala del grotto?")
2024-12-04 17:23:07 +01:00
BTC.SpeechOutputEnded()
2024-09-18 16:48:09 +02:00
2025-01-27 14:58:23 +01:00
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Reise.9")
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Reise.11")
2024-09-16 20:37:29 +02:00
BTC.StartSpeechIntentRecognition()
2024-09-17 14:18:12 +02:00
Composite(Race) {
2024-09-19 17:27:15 +02:00
// -- Race 1: User sagt etwas
2024-09-17 14:18:12 +02:00
Composite(Sequence) {
BTC.UserStartedSpeechInput()
2024-09-19 17:27:15 +02:00
Composite(Selector) {
// -- Selector 1: Intent erkannt
2024-09-17 14:18:12 +02:00
Composite(Sequence) {
2024-09-19 17:27:15 +02:00
BTC.SpeechIntentRecognized()
// Intent erkannt
Composite(Race) {
Composite(Sequence) {
2025-01-27 14:58:23 +01:00
BTC.CompareIntentID("Story_B_Grotto.Antwort_Reise.9")
2024-09-19 17:27:15 +02:00
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche")
}
Composite(Sequence) {
2025-01-27 14:58:23 +01:00
BTC.CompareIntentID("Story_B_Grotto.Antwort_Reise.11")
2024-09-19 17:27:15 +02:00
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto")
}
}
2024-09-17 14:18:12 +02:00
}
2024-09-19 17:27:15 +02:00
// -- Selector 2: Intent nicht erkannt
Composite(Sequence) {
// --- Story B Grotto - Nachfrage Nonna Grotto ---
// SpeechIntentRecognized Failed: kein Intent erkannt
2025-01-27 14:58:23 +01:00
BTC.SynthesizeText("Che cosa volevi dire? Non ho capito. Preferisci aiutare o aspettare in giardino?")
2024-09-19 17:27:15 +02:00
BTC.SpeechOutputEnded()
2024-09-17 17:10:28 +02:00
2024-09-19 17:27:15 +02:00
BTC.StartSpeechIntentRecognition()
Composite(Race) {
Composite(Sequence) {
2024-12-04 17:23:07 +01:00
BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized()
Composite(Race) {
Composite(Sequence) {
2025-01-27 14:58:23 +01:00
BTC.CompareIntentID("Story_B_Grotto.Antwort_Reise.9")
2024-12-04 17:23:07 +01:00
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche")
}
Composite(Sequence) {
2025-01-27 14:58:23 +01:00
BTC.CompareIntentID("Story_B_Grotto.Antwort_Reise.11")
2024-12-04 17:23:07 +01:00
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto")
}
}
2024-09-19 17:27:15 +02:00
}
2024-12-04 17:23:07 +01:00
2024-09-19 17:27:15 +02:00
Composite(Sequence) {
2024-12-04 17:23:07 +01:00
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
BTC.AbortSpeechEventListener()
BTC.StopSpeechIntentRecognition()
2024-09-19 17:27:15 +02:00
BTC.ClearPossbileSpeechIntents()
2024-12-04 17:23:07 +01:00
BTC.CompareUserSpeechInputStarted(true)
2024-09-19 17:27:15 +02:00
}
}
2024-09-17 14:18:12 +02:00
}
2024-09-19 17:27:15 +02:00
2024-12-04 17:23:07 +01:00
// Selector 3: Fallback Button
Composite(Sequence) {
Composite(Marathon) {
2025-01-27 14:58:23 +01:00
BTC.Set("TextMeshPro.GO.Option1Button", "text", "In der Küche helfen.")
2025-01-22 15:45:15 +01:00
BTC.Show("GO.GO.Option1Button")
2025-01-27 14:58:23 +01:00
BTC.Set("TextMeshPro.GO.Option2Button", "text", "Im Garten warten.")
2025-01-22 15:45:15 +01:00
BTC.Show("GO.GO.Option2Button")
2024-12-04 17:23:07 +01:00
}
2024-09-19 17:27:15 +02:00
2024-12-04 17:23:07 +01:00
Composite(Race) {
Composite(Sequence) {
// Kueche
2025-01-22 15:45:15 +01:00
BTC.Run("NamedEventTrigger.GO.Option1Button")
BTC.AbortEventListener("NamedEventTrigger.GO.Option2Button")
BTC.Hide("GO.GO.Option1Button")
BTC.Hide("GO.GO.Option2Button")
2024-12-04 17:23:07 +01:00
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche")
}
Composite(Sequence) {
// Garten
2025-01-22 15:45:15 +01:00
BTC.Run("NamedEventTrigger.GO.Option2Button")
BTC.AbortEventListener("NamedEventTrigger.GO.Option1Button")
BTC.Hide("GO.GO.Option1Button")
BTC.Hide("GO.GO.Option2Button")
2024-12-04 17:23:07 +01:00
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto")
}
}
}
2024-09-17 14:18:12 +02:00
}
}
2024-09-19 17:27:15 +02:00
// -- Race 2: User sagt nichts
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
2024-09-23 17:11:21 +02:00
BTC.AbortSpeechEventListener()
2024-09-19 17:27:15 +02:00
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
2024-09-17 14:18:12 +02:00
2024-09-19 17:27:15 +02:00
// --- Bilder Bergell ---
2025-01-27 14:58:23 +01:00
// TODO: Bergell
2024-09-19 17:27:15 +02:00
//BTC.Run("LoadScene.NEXT.35Slideshow")
}
2024-09-17 14:18:12 +02:00
}
}
}
2024-09-19 17:27:15 +02:00
Tree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche") {
// --- Story B Grotto - Antwort Nonna Kueche ---
2024-09-17 17:10:28 +02:00
Composite(Sequence) {
2025-01-27 17:31:53 +01:00
BTC.SynthesizeText("Oh, va benissimo! Più tardi, naturalmente, offro io la cena.")
2024-09-17 17:10:28 +02:00
BTC.SpeechOutputEnded()
2024-11-28 17:24:33 +01:00
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Nonna_Kueche.2")
2024-09-17 17:10:28 +02:00
BTC.StartSpeechIntentRecognition()
Composite(Race) {
2024-09-19 17:27:15 +02:00
// -- Race 1: User sagt etwas
2024-09-17 17:10:28 +02:00
Composite(Selector) {
Composite(Sequence) {
BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized()
BTC.ClearPossbileSpeechIntents()
}
// Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
}
}
2024-09-19 17:27:15 +02:00
// -- Race 2: User sagt nichts
2024-09-17 17:10:28 +02:00
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
}
}
2024-09-19 17:27:15 +02:00
// --- Story B Grotto - Outro ---
2025-01-27 17:31:53 +01:00
BTC.SynthesizeText("Sai cosa fare, Francensca, vero? C'è da cucinare il risotto. La ricetta la conosci e la trovi comunque lì. Allora, vi lascio, forse ci vediamo più tardi. Quanto sono contenta che aiutiate in cucina! Ciao!")
2024-12-04 17:23:07 +01:00
BTC.SpeechOutputEnded()
BTC.SynthesizeText("Ciao Nonna.")
BTC.SpeechOutputEnded()
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Outro.3")
BTC.StartSpeechIntentRecognition()
Composite(Race) {
// -- Race 1: User sagt etwas
Composite(Selector) {
Composite(Sequence) {
BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized()
BTC.ClearPossbileSpeechIntents()
}
// Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
}
}
// -- Race 2: User sagt nichts
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
}
}
RunTree("32_Grotto_Kueche_Intro")
2024-09-17 17:10:28 +02:00
}
}
2024-09-19 17:27:15 +02:00
Tree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto") {
// --- Story B Grotto - Antwort Nonna Grotto ---
2024-09-17 17:10:28 +02:00
Composite(Sequence) {
2025-01-27 14:58:23 +01:00
BTC.SynthesizeText("Va bene. Forse puoi leggere qualcosa mentre aspetti Francesca nella sala del grotto. Hai portato qualche libro?")
2024-09-17 17:10:28 +02:00
BTC.SpeechOutputEnded()
2024-11-28 17:24:33 +01:00
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Nonna_Grotto.2")
2024-09-17 17:10:28 +02:00
BTC.StartSpeechIntentRecognition()
Composite(Race) {
2024-09-19 17:27:15 +02:00
// -- Race 1: User sagt etwas
2024-09-17 17:10:28 +02:00
Composite(Selector) {
Composite(Sequence) {
BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized()
2024-09-19 17:27:15 +02:00
BTC.ClearPossbileSpeechIntents()
2024-09-17 17:10:28 +02:00
}
// Intent nicht erkannt
Composite(Sequence) {
2024-09-19 17:27:15 +02:00
BTC.ClearPossbileSpeechIntents()
2024-09-17 17:10:28 +02:00
}
}
2024-09-19 17:27:15 +02:00
// -- Race 2: User sagt nichts
2024-09-17 17:10:28 +02:00
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
2025-01-27 14:58:23 +01:00
BTC.AbortSpeechEventListener()
2024-09-17 17:10:28 +02:00
BTC.StopSpeechIntentRecognition()
2024-09-19 17:27:15 +02:00
BTC.ClearPossbileSpeechIntents()
2024-09-17 17:10:28 +02:00
}
}
2025-01-27 14:58:23 +01:00
BTC.SynthesizeText("Ottimo, divertitevi, e buon appetito!")
2024-09-17 17:10:28 +02:00
BTC.SpeechOutputEnded()
2024-11-28 17:24:33 +01:00
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Nonna_Grotto.6")
2024-09-17 17:10:28 +02:00
BTC.StartSpeechIntentRecognition()
Composite(Race) {
2024-09-19 17:27:15 +02:00
// -- Race 1: User sagt etwas
2024-09-17 17:10:28 +02:00
Composite(Selector) {
Composite(Sequence) {
BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized()
BTC.ClearPossbileSpeechIntents()
}
// Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
}
}
2024-09-19 17:27:15 +02:00
// -- Race 2: User sagt nichts
2024-09-17 17:10:28 +02:00
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
2025-01-27 14:58:23 +01:00
BTC.AbortSpeechEventListener()
2024-09-17 17:10:28 +02:00
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
}
}
2024-12-04 17:23:07 +01:00
2025-01-27 14:58:23 +01:00
BTC.SynthesizeText("Mentre aspetti, se vuoi puoi dare un'occhiata alle foto che ho scattato di recente in Bregaglia. Puoi usare il visore che trovi sul tavolo.")
2024-12-04 17:23:07 +01:00
BTC.SpeechOutputEnded()
2025-01-27 14:58:23 +01:00
// TODO: Option VR Brille Bilder und Buch anschauen fehlt
2024-12-04 17:23:07 +01:00
BTC.Wait(10)
2025-01-27 14:58:23 +01:00
// TODO: Szenenuebergang fehlt
BTC.Run("AudioSource.AUDIO.StoryBGrotto10Antw")
2024-12-04 17:23:07 +01:00
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Nonna_Grotto.11")
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Nonna_Grotto.12")
BTC.StartSpeechIntentRecognition()
Composite(Race) {
// -- Race 1: User sagt etwas
Composite(Selector) {
Composite(Sequence) {
BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized()
BTC.ClearPossbileSpeechIntents()
}
// Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
}
}
// -- Race 2: User sagt nichts
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
}
}
2025-01-27 14:58:23 +01:00
BTC.Run("AudioSource.AUDIO.StoryBGrotto15Antw")
2024-12-04 17:23:07 +01:00
RunTree("32_Grotto_Im_Grotto_Essen_Intro")
2024-09-17 17:10:28 +02:00
}
}
2024-07-17 10:56:22 +02:00
Tree("32_Grotto_Kueche_Intro") {
2024-09-19 17:27:15 +02:00
// --- Kueche - Intro ---
2024-07-17 10:56:22 +02:00
Composite(Sequence) {
2025-01-08 14:14:55 +01:00
// Initialization
BTC.Run("StudioEventEmitter.STATIC.Ambi3D")
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.KuecheIntro1")
2024-07-19 19:56:36 +02:00
2024-07-17 17:51:49 +02:00
// Schuerze greifen
2024-08-02 16:38:48 +02:00
BTC.Run("GO/NamedGrabEvent.INTERACTABLES.Schuerze")
BTC.Hide("GO/NamedGrabEvent.INTERACTABLES.Schuerze")
2024-09-24 17:33:08 +02:00
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.KuecheIntro2")
2024-07-19 19:56:36 +02:00
2024-12-04 17:23:07 +01:00
BTC.AddPossbileSpeechIntent("Kueche.Intro.3")
BTC.StartSpeechIntentRecognition()
2024-08-15 17:23:58 +02:00
Composite(Race) {
2024-12-04 17:23:07 +01:00
// -- Race 1: User sagt etwas
Composite(Selector) {
Composite(Sequence) {
BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized()
BTC.ClearPossbileSpeechIntents()
}
// Intent nicht erkannt
Composite(Sequence) {
2024-12-05 17:35:06 +01:00
Decorator(Inverter) {
BTC.CompareUserSpeechInputStarted(false)
}
2024-12-04 17:23:07 +01:00
BTC.ClearPossbileSpeechIntents()
}
2024-08-15 17:23:58 +02:00
}
2024-12-04 17:23:07 +01:00
// -- Race 2: User sagt nichts
2024-08-15 17:23:58 +02:00
Composite(Sequence) {
BTC.Wait(5)
2024-12-04 17:23:07 +01:00
BTC.CompareUserSpeechInputStarted(false)
BTC.AbortSpeechEventListener()
BTC.StopSpeechIntentRecognition()
2025-01-27 17:31:53 +01:00
BTC.SynthesizeText("Di che cosa abbiamo bisogno? Leggi la ricetta, per favore!")
2024-09-24 17:33:08 +02:00
BTC.SpeechOutputEnded()
2024-12-04 17:23:07 +01:00
BTC.StartSpeechIntentRecognition()
Composite(Race) {
// -- Race 1: User sagt etwas
Composite(Selector) {
Composite(Sequence) {
BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized()
BTC.ClearPossbileSpeechIntents()
}
// Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
}
}
// -- Race 2: User sagt nichts
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
BTC.AbortSpeechEventListener()
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
}
}
2024-08-15 17:23:58 +02:00
}
}
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.KuecheIntro5")
2024-12-04 17:23:07 +01:00
2024-07-17 17:51:49 +02:00
// Pilze leuchten
2024-12-04 17:23:07 +01:00
// momentan nur 1 Pilz
BTC.Enable("NamedOutline.INTERACTABLES.Pilz01")
2024-07-17 17:51:49 +02:00
Composite(Race) {
Composite(Sequence) {
2024-07-19 19:56:36 +02:00
// Pilze ins Wasser Glas legen
2024-08-21 17:15:24 +02:00
BTC.Set("Collider.INTERACTABLES.GlassWasserTrigger", "otherTag", "Steinpilze")
BTC.Run("Collider.INTERACTABLES.GlassWasserTrigger")
2024-07-17 17:51:49 +02:00
}
Composite(Sequence) {
// Keine Reaction
2024-07-19 19:56:36 +02:00
BTC.Wait(5)
2024-09-19 17:27:15 +02:00
// --- Kueche - Steinpilze Hilfe ---
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche1SteinpilzeH")
2024-08-21 17:15:24 +02:00
// Pilze ins Wasser Glas legen
BTC.Run("Collider.INTERACTABLES.GlassWasserTrigger")
2024-07-19 19:56:36 +02:00
}
}
2024-12-04 17:23:07 +01:00
BTC.Disable("NamedOutline.INTERACTABLES.Pilz01")
2025-01-31 14:09:46 +01:00
RunTree("32_Grotto_Kueche_Zwiebeln_schneiden")
}
2024-07-19 19:56:36 +02:00
}
Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
2024-09-19 17:27:15 +02:00
// --- Kueche - Zwiebeln schneiden ---
2024-07-19 19:56:36 +02:00
Composite(Sequence) {
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche1Zwiebelnsch")
2024-07-19 19:56:36 +02:00
2024-08-15 17:23:58 +02:00
// Zwiebeln schneiden
2024-12-05 17:35:06 +01:00
BTC.Set("Collider.INTERACTABLES.ZwiebelTrigger", "otherTag", "Messer")
BTC.Run("Collider.INTERACTABLES.ZwiebelTrigger")
2025-01-08 14:14:55 +01:00
Composite(Marathon) {
BTC.Run("StudioEventEmitter.INTERACTABLES.ZwiebelSchneiden")
BTC.Hide("GO.INTERACTABLES.Zwiebel01")
BTC.Show("GO.INTERACTABLES.GeschnitteneZwiebe")
}
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche2Zwiebelnsch")
2024-07-19 19:56:36 +02:00
// Zutaten leuchten
2024-08-12 14:16:00 +02:00
Composite(Marathon) {
2024-12-10 19:50:53 +01:00
BTC.Enable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
2024-08-15 17:23:58 +02:00
BTC.Show("GO/NamedSocketEvent.SOCKETS.BouillonSocket")
2024-12-10 19:50:53 +01:00
BTC.Enable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
2024-08-15 17:23:58 +02:00
BTC.Show("GO/NamedSocketEvent.SOCKETS.WeissweinSocket")
2024-12-10 19:50:53 +01:00
BTC.Enable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
2024-08-15 17:23:58 +02:00
BTC.Show("GO/NamedSocketEvent.SOCKETS.RisottoSocket")
2024-12-10 19:50:53 +01:00
BTC.Enable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel")
2024-08-15 17:23:58 +02:00
BTC.Show("GO/NamedSocketEvent.SOCKETS.OlivenoelSocket")
2024-12-10 19:50:53 +01:00
BTC.Enable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer")
2024-08-15 17:23:58 +02:00
BTC.Show("GO/NamedSocketEvent.SOCKETS.PfefferSocket")
2024-12-10 19:50:53 +01:00
BTC.Enable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Salz")
2024-08-15 17:23:58 +02:00
BTC.Show("GO/NamedSocketEvent.SOCKETS.SalzSocket")
2024-08-12 14:16:00 +02:00
}
2024-07-19 19:56:36 +02:00
2024-08-02 16:38:48 +02:00
// Zutaten auf die Arbeitsflaeche legen mithilfe Sockets
2024-07-25 17:19:11 +02:00
Composite(Marathon) {
2024-12-10 19:50:53 +01:00
// Risotto
Composite(Sequence) {
//BTC.GetKeyDown("Return")
BTC.SetBool("RisottoIsSnapped", false)
Composite(Race) {
2024-08-14 17:33:21 +02:00
Composite(Sequence) {
2024-12-10 19:50:53 +01:00
// Success
BTC.Run("GO/NamedSocketEvent.SOCKETS.RisottoSocket")
2024-08-21 17:15:24 +02:00
//BTC.GetKeyDown("Return")
2024-12-10 19:50:53 +01:00
BTC.SetBool("RisottoIsSnapped")
BTC.Disable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
}
2024-08-15 17:23:58 +02:00
2024-12-10 19:50:53 +01:00
Decorator(Repeat) {
Composite(Sequence) {
// Fail
//BTC.GetKeyDown("Space")
BTC.ListenToEvent("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
2024-12-12 18:54:11 +01:00
BTC.Wait(1)
2024-12-10 19:50:53 +01:00
BTC.CompareBool("RisottoIsSnapped", false)
2024-09-24 17:33:08 +02:00
2024-12-10 19:50:53 +01:00
// Objekt geht zurueck
BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto", -6.824, 1.335, -18.8996)
2024-09-24 17:33:08 +02:00
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche5Zwiebelnsch")
2024-08-15 17:23:58 +02:00
}
2024-12-10 19:50:53 +01:00
}
}
} // Sequence
2024-08-15 17:23:58 +02:00
2024-12-10 19:50:53 +01:00
// Salz
2024-07-25 17:19:11 +02:00
Composite(Sequence) {
2024-12-10 19:50:53 +01:00
BTC.SetBool("SalzIsSnapped", false)
Composite(Race) {
Composite(Sequence) {
// Success
BTC.Run("GO/NamedSocketEvent.SOCKETS.SalzSocket")
BTC.SetBool("SalzIsSnapped")
BTC.Disable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Salz")
}
Decorator(Repeat) {
Composite(Sequence) {
// Fail
BTC.ListenToEvent("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Salz")
2024-12-12 18:54:11 +01:00
BTC.Wait(1)
2024-12-10 19:50:53 +01:00
BTC.CompareBool("SalzIsSnapped", false)
// Objekt geht zurueck
2024-12-12 18:54:11 +01:00
BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Salz", -6.607, 1.321, -18.8996)
2024-12-10 19:50:53 +01:00
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche5Zwiebelnsch")
2024-12-10 19:50:53 +01:00
}
}
}
} // Sequence
// Pfeffer
2024-07-25 17:19:11 +02:00
Composite(Sequence) {
2024-12-10 19:50:53 +01:00
BTC.SetBool("PfefferIsSnapped", false)
Composite(Race) {
Composite(Sequence) {
// Success
BTC.Run("GO/NamedSocketEvent.SOCKETS.PfefferSocket")
BTC.SetBool("PfefferIsSnapped")
BTC.Disable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer")
}
Decorator(Repeat) {
Composite(Sequence) {
// Fail
BTC.ListenToEvent("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer")
2024-12-12 18:54:11 +01:00
BTC.Wait(1)
2024-12-10 19:50:53 +01:00
BTC.CompareBool("PfefferIsSnapped", false)
// Objekt geht zurueck
2024-12-12 18:54:11 +01:00
BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer", -6.686, 1.321, -18.8996)
2024-12-10 19:50:53 +01:00
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche5Zwiebelnsch")
2024-12-10 19:50:53 +01:00
}
}
}
} // Sequence
// Weisswein
2024-07-25 17:19:11 +02:00
Composite(Sequence) {
2024-12-10 19:50:53 +01:00
BTC.SetBool("WeissweinIsSnapped", false)
Composite(Race) {
Composite(Sequence) {
// Success
BTC.Run("GO/NamedSocketEvent.SOCKETS.WeissweinSocket")
BTC.SetBool("WeissweinIsSnapped")
BTC.Disable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
}
Decorator(Repeat) {
Composite(Sequence) {
// Fail
BTC.ListenToEvent("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
2024-12-12 18:54:11 +01:00
BTC.Wait(1)
2024-12-10 19:50:53 +01:00
BTC.CompareBool("WeissweinIsSnapped", false)
// Objekt geht zurueck
2024-12-12 18:54:11 +01:00
BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein", -6.58, 1.451, -19.0233)
2024-12-10 19:50:53 +01:00
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche5Zwiebelnsch")
2024-12-10 19:50:53 +01:00
}
}
}
} // Sequence
// Bouillon
2024-07-25 17:19:11 +02:00
Composite(Sequence) {
2024-12-10 19:50:53 +01:00
BTC.SetBool("BouillonIsSnapped", false)
Composite(Race) {
Composite(Sequence) {
// Success
BTC.Run("GO/NamedSocketEvent.SOCKETS.BouillonSocket")
BTC.SetBool("BouillonIsSnapped")
BTC.Disable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
}
Decorator(Repeat) {
Composite(Sequence) {
// Fail
BTC.ListenToEvent("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
2024-12-12 18:54:11 +01:00
BTC.Wait(1)
2024-12-10 19:50:53 +01:00
BTC.CompareBool("BouillonIsSnapped", false)
// Objekt geht zurueck
2024-12-12 18:54:11 +01:00
BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon", -6.947, 1.402, -18.995)
2024-12-10 19:50:53 +01:00
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche5Zwiebelnsch")
2024-12-10 19:50:53 +01:00
}
}
}
} // Sequence
// Olivenoel
2024-07-25 17:19:11 +02:00
Composite(Sequence) {
2024-12-10 19:50:53 +01:00
BTC.SetBool("OlivenoelIsSnapped", false)
Composite(Race) {
Composite(Sequence) {
// Success
BTC.Run("GO/NamedSocketEvent.SOCKETS.OlivenoelSocket")
BTC.SetBool("OlivenoelIsSnapped")
BTC.Disable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel")
}
Decorator(Repeat) {
Composite(Sequence) {
// Fail
BTC.ListenToEvent("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel")
2024-12-12 18:54:11 +01:00
BTC.Wait(1)
2024-12-10 19:50:53 +01:00
BTC.CompareBool("OlivenoelIsSnapped", false)
// Objekt geht zurueck
2024-12-12 18:54:11 +01:00
BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel", -6.752, 1.449, -19.024)
2024-12-10 19:50:53 +01:00
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche5Zwiebelnsch")
2024-12-10 19:50:53 +01:00
}
}
}
} // Sequence
2024-07-25 17:19:11 +02:00
}
2024-08-12 14:16:00 +02:00
BTC.Wait(1)
Composite(Marathon) {
BTC.Hide("GO/NamedSocketEvent.SOCKETS.OlivenoelSocket")
BTC.Hide("GO/NamedSocketEvent.SOCKETS.BouillonSocket")
BTC.Hide("GO/NamedSocketEvent.SOCKETS.WeissweinSocket")
BTC.Hide("GO/NamedSocketEvent.SOCKETS.PfefferSocket")
BTC.Hide("GO/NamedSocketEvent.SOCKETS.SalzSocket")
BTC.Hide("GO/NamedSocketEvent.SOCKETS.RisottoSocket")
}
2025-01-31 14:09:46 +01:00
RunTree("32_Grotto_Kueche_alles_gefunden")
2024-07-19 19:56:36 +02:00
}
}
Tree("32_Grotto_Kueche_alles_gefunden") {
2024-09-19 17:27:15 +02:00
// --- Kueche - alles gefunden ---
2024-07-19 19:56:36 +02:00
Composite(Sequence) {
2025-01-27 17:31:53 +01:00
BTC.SynthesizeText("Bene, hai trovato tutto. Ora versa un po' di olio d'oliva nella pentola.")
2024-09-23 17:11:21 +02:00
BTC.SpeechOutputEnded()
2025-01-07 17:33:31 +01:00
// Oel in Topf geben - ToDo: Particle Trigger
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Olivenoel")
BTC.Run("Collider.INTERACTABLES.Topf")
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche2allesgefund")
2024-07-19 19:56:36 +02:00
2025-01-08 14:14:55 +01:00
// Herd anstellen - ToDo: Handling in Story?
2024-12-16 20:19:12 +01:00
BTC.Run("NamedGrabEvent.STATIC.Herdschalter")
2025-01-08 14:14:55 +01:00
BTC.Run("StudioEventEmitter.STATIC.HerdplatteAnstelle")
2024-12-16 20:19:12 +01:00
2024-07-19 19:56:36 +02:00
// Zwiebeln in Topf geben
2024-07-25 17:19:11 +02:00
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Zwiebeln")
BTC.Run("Collider.INTERACTABLES.Topf")
2025-01-08 14:14:55 +01:00
BTC.Run("StudioEventEmitter.INTERACTABLES.ZwiebelnInTopf")
2024-12-16 20:19:12 +01:00
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche3allesgefund")
2024-07-19 19:56:36 +02:00
// Frage beantworten
2024-11-28 17:24:33 +01:00
BTC.AddPossbileSpeechIntent("Kueche.alles_gefunden.4")
BTC.AddPossbileSpeechIntent("Kueche.alles_gefunden.6")
2024-09-19 17:27:15 +02:00
BTC.StartSpeechIntentRecognition()
2024-07-19 19:56:36 +02:00
Composite(Race) {
2024-09-19 17:27:15 +02:00
// -- Race 1: User sagt etwas
2024-07-19 19:56:36 +02:00
Composite(Sequence) {
2024-09-19 17:27:15 +02:00
BTC.UserStartedSpeechInput()
Composite(Selector) {
// -- Selector 1: Intent erkannt
Composite(Sequence) {
BTC.SpeechIntentRecognized()
// Intent erkannt
Composite(Race) {
Composite(Sequence) {
BTC.CompareIntentID("Kueche.alles_gefunden.4")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Interesse_Kochen")
}
Composite(Sequence) {
BTC.CompareIntentID("Kueche.alles_gefunden.6")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
}
}
}
// -- Selector 2: Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
// Fallback Button
Composite(Marathon) {
2025-01-22 15:45:15 +01:00
BTC.Set("TextMeshPro.GO.Option1Button", "text", "Ja")
BTC.Show("GO.GO.Option1Button")
BTC.Set("TextMeshPro.GO.Option2Button", "text", "Nein")
BTC.Show("GO.GO.Option2Button")
2024-09-19 17:27:15 +02:00
}
Composite(Race) {
Composite(Sequence) {
// Ja
2025-01-22 15:45:15 +01:00
BTC.Run("NamedEventTrigger.GO.Option1Button")
BTC.AbortEventListener("NamedEventTrigger.GO.Option2Button")
BTC.Hide("GO.GO.Option1Button")
BTC.Hide("GO.GO.Option2Button")
2024-09-19 17:27:15 +02:00
RunTree("32_Grotto_Kueche_Interesse_Kochen")
}
Composite(Sequence) {
// Nein
2025-01-22 15:45:15 +01:00
BTC.Run("NamedEventTrigger.GO.Option2Button")
BTC.AbortEventListener("NamedEventTrigger.GO.Option1Button")
BTC.Hide("GO.GO.Option1Button")
BTC.Hide("GO.GO.Option2Button")
2024-09-19 17:27:15 +02:00
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
}
}
}
}
2024-07-19 19:56:36 +02:00
}
2024-09-19 17:27:15 +02:00
// -- Race 2: User sagt nichts
2024-07-19 19:56:36 +02:00
Composite(Sequence) {
2024-09-19 17:27:15 +02:00
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
2024-09-23 17:11:21 +02:00
BTC.AbortSpeechEventListener()
2024-09-19 17:27:15 +02:00
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
// Fallback Button
Composite(Marathon) {
2025-01-22 15:45:15 +01:00
BTC.Set("TextMeshPro.GO.Option1Button", "text", "Ja")
BTC.Show("GO.GO.Option1Button")
BTC.Set("TextMeshPro.GO.Option2Button", "text", "Nein")
BTC.Show("GO.GO.Option2Button")
2024-09-19 17:27:15 +02:00
}
Composite(Race) {
Composite(Sequence) {
// Ja
2025-01-22 15:45:15 +01:00
BTC.Run("NamedEventTrigger.GO.Option1Button")
BTC.AbortEventListener("NamedEventTrigger.GO.Option2Button")
BTC.Hide("GO.GO.Option1Button")
BTC.Hide("GO.GO.Option2Button")
2024-09-19 17:27:15 +02:00
RunTree("32_Grotto_Kueche_Interesse_Kochen")
}
Composite(Sequence) {
// Nein
2025-01-22 15:45:15 +01:00
BTC.Run("NamedEventTrigger.GO.Option2Button")
BTC.AbortEventListener("NamedEventTrigger.GO.Option1Button")
BTC.Hide("GO.GO.Option1Button")
BTC.Hide("GO.GO.Option2Button")
2024-09-19 17:27:15 +02:00
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
}
}
2024-07-19 19:56:36 +02:00
}
2024-09-19 17:27:15 +02:00
}
2024-07-19 19:56:36 +02:00
}
}
Tree("32_Grotto_Kueche_Interesse_Kochen") {
2024-09-19 17:27:15 +02:00
// --- Kueche - Interesse Kochen ---
2024-07-19 19:56:36 +02:00
Composite(Sequence) {
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche1InteresseKo")
2025-02-03 17:40:54 +01:00
// Frage beantworten
BTC.AddPossbileSpeechIntent("Kueche.Interesse_Kochen.2")
BTC.StartSpeechIntentRecognition()
2024-07-19 19:56:36 +02:00
Composite(Race) {
2025-02-03 17:40:54 +01:00
// -- Race 1: User sagt etwas
2024-07-19 19:56:36 +02:00
Composite(Sequence) {
2025-02-03 17:40:54 +01:00
BTC.UserStartedSpeechInput()
Composite(Selector) {
// -- Selector 1: Intent erkannt
Composite(Sequence) {
BTC.SpeechIntentRecognized()
// Intent erkannt
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Kochen_Anzahl")
}
// -- Selector 2: Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Kochen_Anzahl")
}
}
2024-07-19 19:56:36 +02:00
}
2025-02-03 17:40:54 +01:00
// -- Race 2: User sagt nichts
2024-07-19 19:56:36 +02:00
Composite(Sequence) {
BTC.Wait(5)
2025-02-03 17:40:54 +01:00
BTC.CompareUserSpeechInputStarted(false)
BTC.AbortSpeechEventListener()
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
2024-07-19 19:56:36 +02:00
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
}
2025-02-03 17:40:54 +01:00
}
2024-07-19 19:56:36 +02:00
}
}
Tree("32_Grotto_Kueche_Kochen_Anzahl") {
2024-09-19 17:27:15 +02:00
// --- Kueche - Kochen Anzahl ---
2024-07-19 19:56:36 +02:00
Composite(Sequence) {
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche1KochenAnzah")
2024-07-19 19:56:36 +02:00
// Frage beantworten
2024-11-28 17:24:33 +01:00
BTC.AddPossbileSpeechIntent("Kueche.Kochen_Anzahl.2")
BTC.AddPossbileSpeechIntent("Kueche.Kochen_Anzahl.4")
2024-09-19 17:27:15 +02:00
BTC.StartSpeechIntentRecognition()
2024-07-19 19:56:36 +02:00
Composite(Race) {
2024-09-19 17:27:15 +02:00
// -- Race 1: User sagt etwas
2024-07-19 19:56:36 +02:00
Composite(Sequence) {
2024-09-19 17:27:15 +02:00
BTC.UserStartedSpeechInput()
Composite(Selector) {
// -- Selector 1: Intent erkannt
Composite(Sequence) {
BTC.SpeechIntentRecognized()
// Intent erkannt
Composite(Race) {
Composite(Sequence) {
BTC.CompareIntentID("Kueche.Kochen_Anzahl.2")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Selbststaendig_Kochen")
}
Composite(Sequence) {
BTC.CompareIntentID("Kueche.Kochen_Anzahl.4")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
}
}
}
// -- Selector 2: Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
// Fallback Button
Composite(Marathon) {
2025-01-22 15:45:15 +01:00
BTC.Set("TextMeshPro.GO.Option1Button", "text", "sehr oft")
BTC.Show("GO.GO.Option1Button")
BTC.Set("TextMeshPro.GO.Option2Button", "text", "selten")
BTC.Show("GO.GO.Option2Button")
2024-09-19 17:27:15 +02:00
}
Composite(Race) {
Composite(Sequence) {
// sehr oft
2025-01-22 15:45:15 +01:00
BTC.Run("NamedEventTrigger.GO.Option1Button")
BTC.AbortEventListener("NamedEventTrigger.GO.Option2Button")
BTC.Hide("GO.GO.Option1Button")
BTC.Hide("GO.GO.Option2Button")
2024-09-19 17:27:15 +02:00
RunTree("32_Grotto_Kueche_Selbststaendig_Kochen")
}
Composite(Sequence) {
// selten
2025-01-22 15:45:15 +01:00
BTC.Run("NamedEventTrigger.GO.Option2Button")
BTC.AbortEventListener("NamedEventTrigger.GO.Option1Button")
BTC.Hide("GO.GO.Option1Button")
BTC.Hide("GO.GO.Option2Button")
2024-09-19 17:27:15 +02:00
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
}
}
}
}
2024-07-19 19:56:36 +02:00
}
2024-09-19 17:27:15 +02:00
// -- Race 2: User sagt nichts
2024-07-19 19:56:36 +02:00
Composite(Sequence) {
BTC.Wait(5)
2024-09-19 17:27:15 +02:00
BTC.CompareUserSpeechInputStarted(false)
2024-09-23 17:11:21 +02:00
BTC.AbortSpeechEventListener()
2024-09-19 17:27:15 +02:00
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
2024-07-19 19:56:36 +02:00
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
2024-07-17 17:51:49 +02:00
}
2024-09-19 17:27:15 +02:00
}
2024-07-17 10:56:22 +02:00
}
}
2024-07-19 19:56:36 +02:00
Tree("32_Grotto_Kueche_Zusammen_Kochen") {
2024-09-19 17:27:15 +02:00
// --- Kueche - Zusammen Kochen ---
2024-07-19 19:56:36 +02:00
Composite(Sequence) {
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche1ZusammenKoc")
2024-07-30 17:25:03 +02:00
// Risotto in Topf geben
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Risotto")
BTC.Run("Collider.INTERACTABLES.Topf")
2025-01-07 17:33:31 +01:00
// Ruehren
2024-07-30 17:25:03 +02:00
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Loeffel")
BTC.Run("Collider.INTERACTABLES.Topf")
2025-01-07 17:33:31 +01:00
BTC.Wait(2) // Wie lange ruehren?
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche2ZusammenKoc")
2024-07-30 17:25:03 +02:00
// Wein leuchtet
2024-08-21 17:15:24 +02:00
BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
2024-07-30 17:25:03 +02:00
// Wein greifen
2024-07-31 17:24:16 +02:00
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
2024-08-21 17:15:24 +02:00
BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
2024-07-30 17:25:03 +02:00
2025-01-07 17:33:31 +01:00
// Wein in Topf giessen - Todo: Particle Trigger
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Weisswein")
BTC.Run("Collider.INTERACTABLES.Topf")
2025-01-08 14:14:55 +01:00
BTC.StopSound("StudioEventEmitter.INTERACTABLES.ZwiebelnInTopf")
BTC.Run("StudioEventEmitter.INTERACTABLES.Abloeschen")
2024-07-30 17:25:03 +02:00
2025-01-08 21:05:21 +01:00
Composite(Marathon) {
Composite(Sequence) {
2025-01-27 17:31:53 +01:00
BTC.Wait(16)
2025-01-08 21:05:21 +01:00
BTC.SetFloat("StudioEventEmitter.INTERACTABLES.Abloeschen", "blubbern.transition", 1)
BTC.Show("GO.INTERACTABLES.ChangeSound") // Ruehren
}
Composite(Sequence) {
2025-01-27 17:31:53 +01:00
BTC.Wait(5)
BTC.Run("AudioSource.AUDIO.Kueche3ZusammenKoc")
2025-01-08 21:05:21 +01:00
}
}
2024-08-21 17:15:24 +02:00
// Bouillon leuchtet
BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
2024-07-30 17:25:03 +02:00
// Bouillon greifen
2024-07-31 17:24:16 +02:00
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
2024-08-21 17:15:24 +02:00
BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
2024-07-30 17:25:03 +02:00
2025-01-07 17:33:31 +01:00
// Bouillon in Topf geben - Todo: Particle Trigger
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Bouillon")
BTC.Run("Collider.INTERACTABLES.Topf")
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche4ZusammenKoc")
2024-07-30 17:25:03 +02:00
// Glas Wasser mit Steinpilze in Topf geben
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Steinpilze")
BTC.Run("Collider.INTERACTABLES.Topf")
2025-01-08 14:14:55 +01:00
//RunTree("32_Grotto_Kueche_Parmigiano")
RunTree("32_Grotto_Im_Grotto_Essen_Intro")
2024-08-21 17:15:24 +02:00
}
}
Tree("32_Grotto_Kueche_Selbststaendig_Kochen") {
2024-09-19 17:27:15 +02:00
// --- Kueche - Selbststaendig Kochen ---
2024-08-21 17:15:24 +02:00
Composite(Sequence) {
2025-01-27 17:31:53 +01:00
BTC.Run("AudioSource.AUDIO.Kueche1Selbststaen")
2024-08-21 17:15:24 +02:00
// Selbstaendig kochen...
// ...
2025-01-27 17:31:53 +01:00
BTC.GetKeyDown("Return")
2024-08-21 17:15:24 +02:00
RunTree("32_Grotto_Kueche_Parmigiano")
}
}
Tree("32_Grotto_Kueche_Parmigiano") {
2024-09-19 17:27:15 +02:00
// --- Kueche - Parmigiano ---
2024-09-05 16:43:17 +02:00
Composite(Sequence) {
2025-02-03 17:40:54 +01:00
BTC.SynthesizeText("Ho preparato il parmigiano, puoi aggiungerlo al risotto, per piacere?")
2024-09-24 17:33:08 +02:00
BTC.SpeechOutputEnded()
2024-08-21 17:15:24 +02:00
// Parmigiano in Topf geben
2024-09-05 16:43:17 +02:00
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Parmigiano")
BTC.Run("Collider.INTERACTABLES.Topf")
2024-08-21 17:15:24 +02:00
2025-02-03 17:40:54 +01:00
BTC.SynthesizeText("Hai finito?")
2024-09-24 17:33:08 +02:00
BTC.SpeechOutputEnded()
2024-08-21 17:15:24 +02:00
// Antwort User
2025-02-03 17:40:54 +01:00
BTC.AddPossbileSpeechIntent("Kueche.Zusammen_Kochen.6")
BTC.StartSpeechIntentRecognition()
2024-08-21 17:15:24 +02:00
Composite(Race) {
2025-02-03 17:40:54 +01:00
// -- Race 1: User sagt etwas
Composite(Sequence) {
BTC.UserStartedSpeechInput()
Composite(Selector) {
// -- Selector 1: Intent erkannt
Composite(Sequence) {
BTC.SpeechIntentRecognized()
// Intent erkannt
BTC.ClearPossbileSpeechIntents()
}
// -- Selector 2: Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
}
}
}
// -- Race 2: User sagt nichts
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
BTC.AbortSpeechEventListener()
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
}
2024-08-21 17:15:24 +02:00
}
2024-11-28 17:24:33 +01:00
BTC.SynthesizeText("Bitte stelle den Risotto hier hin.")
2024-09-24 17:33:08 +02:00
BTC.SpeechOutputEnded()
2024-08-21 17:15:24 +02:00
// Stelle für Pfanne leuchtet
2024-09-05 16:43:17 +02:00
BTC.Enable("Collider/NamedOutline.INTERACTABLES.TopfUntersetzer")
2024-08-21 17:15:24 +02:00
2024-07-30 17:25:03 +02:00
// Pfanne rueber stellen
2024-09-05 16:43:17 +02:00
BTC.Run("NamedGrabEvent.INTERACTABLES.Topf")
BTC.Set("Collider/NamedOutline.INTERACTABLES.TopfUntersetzer", "otherTag", "Topf")
BTC.Run("Collider/NamedOutline.INTERACTABLES.TopfUntersetzer")
BTC.Disable("Collider/NamedOutline.INTERACTABLES.TopfUntersetzer")
2024-09-24 17:33:08 +02:00
// ToDo: Fallback Keine Reaktion
2024-08-21 17:15:24 +02:00
2024-07-30 17:25:03 +02:00
BTC.Run("AudioSource.AUDIO.Kueche5FZusammenKo")
BTC.Run("AudioSource.AUDIO.Kueche6FZusammenKo")
2024-09-19 17:27:15 +02:00
// --- Kueche - Outro ---
2024-07-30 17:25:03 +02:00
BTC.Run("AudioSource.AUDIO.Kueche1GOutro")
2024-11-28 17:24:33 +01:00
BTC.SynthesizeText("Ich bin Giuseppe, Francescas Grossonkel. Und wer bist du?")
2024-09-24 17:33:08 +02:00
BTC.SpeechOutputEnded()
2024-07-30 17:25:03 +02:00
// Name sagen
2024-11-28 17:24:33 +01:00
BTC.AddPossbileSpeechIntent("Kueche.Outro.4")
2024-09-19 17:27:15 +02:00
BTC.StartSpeechIntentRecognition()
2024-07-30 17:25:03 +02:00
Composite(Race) {
2024-09-19 17:27:15 +02:00
// -- Race 1: User sagt etwas
Composite(Sequence) {
BTC.UserStartedSpeechInput()
Composite(Selector) {
// -- Selector 1: Intent erkannt
Composite(Sequence) {
BTC.SpeechIntentRecognized()
BTC.ClearPossbileSpeechIntents()
}
// -- Selector 2: Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
// Fallback Button
2025-01-22 15:45:15 +01:00
BTC.Set("TextMeshPro.GO.Option1Button", "text", "Mein Name ist User.")
BTC.Show("GO.GO.Option1Button")
BTC.Run("NamedEventTrigger.GO.Option1Button")
BTC.Hide("GO.GO.Option1Button")
2024-09-19 17:27:15 +02:00
}
}
}
// -- Race 2: User sagt nichts
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
2024-09-23 17:11:21 +02:00
BTC.AbortSpeechEventListener()
2024-09-19 17:27:15 +02:00
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
}
}
2024-07-30 17:25:03 +02:00
BTC.Run("AudioSource.AUDIO.Kueche3GOutro")
2024-09-24 17:33:08 +02:00
BTC.Run("AudioSource.AUDIO.Kueche2GOutro")
2024-09-05 16:43:17 +02:00
}
2024-07-19 19:56:36 +02:00
}
2024-12-04 17:23:07 +01:00
Tree("32_Grotto_Im_Grotto_Essen_Intro") {
2025-01-08 14:14:55 +01:00
// --- Im Grotto Essen - Intro ---
Composite(Sequence) {
// Initialization
Composite(Marathon) {
BTC.SetPosition("GO.XRInteractionHandsSetup.XROrigin", -3.837, 0, -10.676)
BTC.SetPosition("GO.HANDMENU", -3.837, 0, -10.676)
BTC.Run("StudioEventEmitter.STATIC.KuechenAmbi")
BTC.Run("StudioEventEmitter.AUDIO.Ambi2D")
BTC.StopSound("StudioEventEmitter.STATIC.Ambi3D")
BTC.StopSound("StudioEventEmitter.STATIC.HerdplatteAnstelle")
BTC.StopSound("StudioEventEmitter.INTERACTABLES.Abloeschen")
}
BTC.GetKeyDown("Return")
2024-12-04 17:23:07 +01:00
2025-01-08 14:14:55 +01:00
}
2024-12-04 17:23:07 +01:00
}
2024-07-17 10:56:22 +02:00
Tree("32_Grotto_Kueche_Hide") {
2024-06-05 16:23:48 +02:00
Composite(Sequence) {
// Go to scene 3.5 Slideshow
BTC.GetKeyDown("Return")
2025-01-17 17:26:41 +01:00
BTC.SetStoryBVisited()
2024-06-05 16:23:48 +02:00
BTC.Run("LoadScene.NEXT.35Slideshow")
}
}
2024-09-05 16:43:17 +02:00