UP-Viagg-io/Viagg-io/Assets/BehaviourTrees/3.2-Grotto.bt.txt

1057 lines
41 KiB
Plaintext
Raw Normal View History

2024-06-05 16:23:48 +02:00
Tree("Root") {
2024-07-19 19:56:36 +02:00
Composite(Sequence) {
2024-09-19 17:27:15 +02:00
BTC.InitializeSpeechManager()
2024-12-04 17:23:07 +01:00
//BTC.SetSpeechRecognitionLanguage("it-IT")
RunTree("32_Grotto_Story_B_Grotto_Intro")
2024-11-08 17:29:50 +01:00
//RunTree("32_Grotto_Kueche_Intro")
2024-10-14 17:16:44 +02:00
RunTree("32_Grotto_Kueche_Zwiebeln_schneiden")
2024-11-08 17:29:50 +01:00
//RunTree("32_Grotto_Kueche_alles_gefunden")
//RunTree("32_Grotto_Kueche_Kochen_Anzahl")
//RunTree("32_Grotto_Kueche_Zusammen_Kochen")
2024-09-19 17:27:15 +02:00
2024-12-04 17:23:07 +01:00
}
}
2024-12-04 17:23:07 +01:00
Tree("32_Grotto_Story_B_Grotto_Intro") {
Composite(Sequence) {
2024-12-04 17:23:07 +01:00
BTC.SynthesizeText("So, da wären wir. Willkommen in Nonnas Grotto! Ich mag die Busfahrt hier hoch. Und ich mag auch diese Aussicht. Hast du schon ein paar Fotos gemacht?")
2024-09-17 17:10:28 +02:00
BTC.SpeechOutputEnded()
2024-12-04 17:23:07 +01:00
BTC.Wait(5)
2024-12-04 17:23:07 +01:00
BTC.SynthesizeText("Hast du gewusst, dass auch im Kanton Graubünden italienisch gesprochen wird?")
BTC.SpeechOutputEnded()
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()
}
}
BTC.SynthesizeText("Sogar in 4 Tälern: hier im Val Mesolcina, im Val Calanca, im Val Bregaglio und im Valposchiavo. Oh, die Nonna ruft an!")
BTC.SpeechOutputEnded()
// --- Story B Grotto - Telefonat ---
BTC.SynthesizeText("Hallo Nonna.")
BTC.SpeechOutputEnded()
BTC.SynthesizeText("Hallo Francesca. Bist du schon angekommen?")
BTC.SpeechOutputEnded()
BTC.SynthesizeText("Ja, wir sind soeben angekommen. Ich bin nicht alleine heute, ich habe noch jemanden mitgebracht.")
BTC.SpeechOutputEnded()
BTC.SynthesizeText("Oh, wie schön, wer ist es denn?")
BTC.SpeechOutputEnded()
BTC.SynthesizeText("Stell dich doch gleich selbst vor.")
BTC.SpeechOutputEnded()
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 ---
BTC.SynthesizeText("Hallo, willkommen im Grotto. Wie war denn die Reise?")
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()
}
}
BTC.SynthesizeText("Wie gefällt dir denn das Misox?")
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()
}
}
BTC.SynthesizeText("Ich möchte nirgends sonst auf der Welt leben. Möchtest du denn mit Francesca in der Küche etwas aushelfen oder wartest du im Garten auf sie?")
BTC.SpeechOutputEnded()
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Nachfrage_Nonna_Grotto.2")
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Nachfrage_Nonna_Grotto.4")
BTC.StartSpeechIntentRecognition()
Composite(Race) {
2024-09-19 17:27:15 +02:00
// -- Race 1: User sagt etwas
Composite(Sequence) {
BTC.UserStartedSpeechInput()
2024-09-19 17:27:15 +02:00
Composite(Selector) {
// -- Selector 1: Intent erkannt
Composite(Sequence) {
2024-09-19 17:27:15 +02:00
BTC.SpeechIntentRecognized()
// Intent erkannt
Composite(Race) {
Composite(Sequence) {
BTC.CompareIntentID("Story_B_Grotto.Nachfrage_Nonna_Grotto.2")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche")
}
Composite(Sequence) {
BTC.CompareIntentID("Story_B_Grotto.Nachfrage_Nonna_Grotto.4")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto")
}
}
}
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
BTC.SynthesizeText("Was wolltest du sagen? Ich habe es nicht verstanden. Möchtest du mithelfen oder lieber im Garten warten?")
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) {
BTC.CompareIntentID("Story_B_Grotto.Nachfrage_Nonna_Grotto.2")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche")
}
Composite(Sequence) {
BTC.CompareIntentID("Story_B_Grotto.Nachfrage_Nonna_Grotto.4")
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-19 17:27:15 +02:00
2024-12-04 17:23:07 +01:00
// Selector 3: Fallback Button
Composite(Sequence) {
Composite(Marathon) {
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Küche")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "Garten")
BTC.Show("GO.HANDMENU.Option2Button")
}
2024-09-19 17:27:15 +02:00
2024-12-04 17:23:07 +01:00
Composite(Race) {
Composite(Sequence) {
// Kueche
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option2Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche")
}
Composite(Sequence) {
// Garten
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto")
}
}
}
}
}
2024-09-19 17:27:15 +02:00
// -- Race 2: User sagt nichts
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
BTC.AbortSpeechEventListener()
2024-09-19 17:27:15 +02:00
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
2024-09-19 17:27:15 +02:00
// --- Bilder Bergell ---
//BTC.Run("LoadScene.NEXT.35Slideshow")
}
}
}
}
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) {
BTC.SynthesizeText("Oh, das ist wunderbar, vielen Dank! Anschliessend seid ihr selbstverständlich zum Essen eingeladen.")
2024-09-17 17:10:28 +02:00
BTC.SpeechOutputEnded()
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 ---
2024-12-04 17:23:07 +01:00
BTC.SynthesizeText("Francesca, der Risotto sollte gekocht werden, du weisst ja, was zu tun ist, oder? Das Rezept habe ich euch hingelegt. Also dann, wir sehen uns später sicher noch. Ich bin ja so froh, dass ihr zwei eingesprungen seid! Ciao!")
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) {
BTC.SynthesizeText("Okay gut, mach es dir gemütlich. Hast du etwas zum Lesen dabei?")
2024-09-17 17:10:28 +02:00
BTC.SpeechOutputEnded()
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)
BTC.StopSpeechIntentRecognition()
2024-09-19 17:27:15 +02:00
BTC.ClearPossbileSpeechIntents()
2024-09-17 17:10:28 +02:00
}
}
BTC.SynthesizeText("Prima, viel Spass noch und dann guten Appetit!")
2024-09-17 17:10:28 +02:00
BTC.SpeechOutputEnded()
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)
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
}
}
2024-12-04 17:23:07 +01:00
BTC.SynthesizeText("Wenn du magst, kannst du in der Zwischenzeit auch meine Fotos aus dem Bergell anschauen, die ich kürzlich gemacht habe. Auf dem Tisch ist eine VR-Brille. Damit kannst du die Bilder in 3D anschauen.")
BTC.SpeechOutputEnded()
// Option VR Brille Bilder und Buch anschauen fehlt
BTC.Wait(10)
// Szenenuebergang fehlt
BTC.SynthesizeText("So, das war anstrengend, aber ich glaube, der Risotto ist gut geworden. Was hast du in dieser Zeit gemacht?")
BTC.SpeechOutputEnded()
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()
}
}
BTC.SynthesizeText("Das klingt gut. So, nun habe ich aber Hunger. Lass uns was bestellen.")
BTC.SpeechOutputEnded()
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) {
2024-07-19 19:56:36 +02:00
BTC.Run("AudioSource.AUDIO.Kueche1FIntro")
// 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
BTC.SynthesizeText("Lies mir bitte das Rezept vor.")
2024-09-24 17:33:08 +02:00
BTC.SpeechOutputEnded()
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) {
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()
BTC.SynthesizeText("Was brauchen wir? Bitte lies mir das Rezept vor.")
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
}
}
2024-07-19 19:56:36 +02:00
BTC.Run("AudioSource.AUDIO.Kueche3FIntro")
2024-12-04 17:23:07 +01:00
// Pilze leuchten
2024-12-04 17:23:07 +01:00
// momentan nur 1 Pilz
BTC.Enable("NamedOutline.INTERACTABLES.Pilz01")
Composite(Race) {
Composite(Sequence) {
2024-07-19 19:56:36 +02:00
// Pilze ins Wasser Glas legen
BTC.Set("Collider.INTERACTABLES.GlassWasserTrigger", "otherTag", "Steinpilze")
BTC.Run("Collider.INTERACTABLES.GlassWasserTrigger")
}
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 ---
BTC.Run("AudioSource.AUDIO.Kueche1FSteinpilze")
// Pilze ins Wasser Glas legen
BTC.Set("Collider.INTERACTABLES.GlassWasserTrigger", "otherTag", "Steinpilze")
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")
}
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) {
BTC.Run("AudioSource.AUDIO.Kueche1FZwiebelnsc")
2024-08-15 17:23:58 +02:00
// Zwiebeln schneiden
// ...
2024-07-19 19:56:36 +02:00
BTC.Run("AudioSource.AUDIO.Kueche2FZwiebelnsc")
// Zutaten leuchten
Composite(Marathon) {
BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
2024-08-15 17:23:58 +02:00
BTC.Show("GO/NamedSocketEvent.SOCKETS.BouillonSocket")
BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
2024-08-15 17:23:58 +02:00
BTC.Show("GO/NamedSocketEvent.SOCKETS.WeissweinSocket")
BTC.Enable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
2024-08-15 17:23:58 +02:00
BTC.Show("GO/NamedSocketEvent.SOCKETS.RisottoSocket")
BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel")
2024-08-15 17:23:58 +02:00
BTC.Show("GO/NamedSocketEvent.SOCKETS.OlivenoelSocket")
BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer")
2024-08-15 17:23:58 +02:00
BTC.Show("GO/NamedSocketEvent.SOCKETS.PfefferSocket")
BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Salz")
2024-08-15 17:23:58 +02:00
BTC.Show("GO/NamedSocketEvent.SOCKETS.SalzSocket")
}
2024-07-19 19:56:36 +02:00
2024-08-02 16:38:48 +02:00
// Zutaten auf die Arbeitsflaeche legen mithilfe Sockets
Composite(Marathon) {
2024-08-15 17:23:58 +02:00
Decorator (RepeatUntilFailed) {
Decorator(Inverter) {
2024-08-14 17:33:21 +02:00
Composite(Sequence) {
BTC.Run("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
//BTC.GetKeyDown("Return")
2024-08-15 17:23:58 +02:00
Composite(Race) {
Composite(Sequence) {
// Success
BTC.Run("GO/NamedSocketEvent.SOCKETS.RisottoSocket")
2024-09-24 17:33:08 +02:00
//BTC.GetKeyDown("Return")
BTC.SetBool("RisottoIsSnapped")
BTC.Disable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
2024-08-15 17:23:58 +02:00
}
Composite(Sequence) {
// Fail
2024-09-24 17:33:08 +02:00
//BTC.GetKeyDown("Space")
BTC.ListenToEvent("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
BTC.CompareBool("RisottoIsSnapped", false)
// Objekt geht zurueck
BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto", -6.733, 1.362, -18.908)
BTC.SynthesizeText("Das hast du an den falschen Ort gestellt.")
2024-09-24 17:33:08 +02:00
BTC.SpeechOutputEnded()
BTC.SetBool("RisottoIsSnapped", false)
2024-08-15 17:23:58 +02:00
}
}
2024-09-24 17:33:08 +02:00
BTC.CompareBool("RisottoIsSnapped")
2024-08-15 17:23:58 +02:00
} // Sequence
}
} // Repeat
Composite(Sequence) {
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Salz")
BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Salz")
BTC.Run("GO/NamedSocketEvent.SOCKETS.SalzSocket")
}
Composite(Sequence) {
2024-08-15 17:23:58 +02:00
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer")
BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer")
BTC.Run("GO/NamedSocketEvent.SOCKETS.PfefferSocket")
}
Composite(Sequence) {
2024-08-15 17:23:58 +02:00
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
BTC.Run("GO/NamedSocketEvent.SOCKETS.WeissweinSocket")
}
Composite(Sequence) {
2024-08-15 17:23:58 +02:00
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
BTC.Run("GO/NamedSocketEvent.SOCKETS.BouillonSocket")
}
Composite(Sequence) {
2024-08-15 17:23:58 +02:00
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel")
BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel")
BTC.Run("GO/NamedSocketEvent.SOCKETS.OlivenoelSocket")
}
}
2024-09-24 17:33:08 +02:00
BTC.SetBool("RisottoIsSnapped", false)
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")
}
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) {
BTC.SynthesizeText("Super, du hast alles gefunden. Bitte gib nun etwas Olivenöl in den Topf.")
BTC.SpeechOutputEnded()
2024-07-19 19:56:36 +02:00
// Oel in Topf geben - Particle Trigger
// ...
BTC.Run("AudioSource.AUDIO.Kueche2Fallesgefun")
//BTC.GetKeyDown("Return")
2024-07-19 19:56:36 +02:00
// Zwiebeln in Topf geben
BTC.Run("NamedGrabEvent.INTERACTABLES.Zwiebeln")
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Zwiebeln")
BTC.Run("Collider.INTERACTABLES.Topf")
BTC.Run("AudioSource.AUDIO.Kueche3Fallesgefun")
2024-07-19 19:56:36 +02:00
// Frage beantworten
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) {
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Ja")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "Nein")
BTC.Show("GO.HANDMENU.Option2Button")
}
Composite(Race) {
Composite(Sequence) {
// Ja
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option2Button")
2024-09-19 17:27:15 +02:00
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Interesse_Kochen")
}
Composite(Sequence) {
// Nein
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option1Button")
2024-09-19 17:27:15 +02:00
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
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)
BTC.AbortSpeechEventListener()
2024-09-19 17:27:15 +02:00
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
// Fallback Button
Composite(Marathon) {
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Ja")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "Nein")
BTC.Show("GO.HANDMENU.Option2Button")
}
Composite(Race) {
Composite(Sequence) {
// Ja
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option2Button")
2024-09-19 17:27:15 +02:00
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Interesse_Kochen")
}
Composite(Sequence) {
// Nein
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option1Button")
2024-09-19 17:27:15 +02:00
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
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) {
BTC.Run("AudioSource.AUDIO.Kueche1FInteresseK")
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Lasagne")
BTC.Show("GO.HANDMENU.Option1Button")
2024-09-19 17:27:15 +02:00
BTC.SetBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked", false)
2024-07-19 19:56:36 +02:00
Composite(Race) {
Composite(Sequence) {
// Lieblingsessen nennen
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
2024-09-19 17:27:15 +02:00
BTC.SetBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked")
BTC.Hide("GO.HANDMENU.Option1Button")
2024-07-19 19:56:36 +02:00
RunTree("32_Grotto_Kueche_Kochen_Anzahl")
}
Composite(Sequence) {
// keine Antwort
BTC.Wait(5)
2024-09-19 17:27:15 +02:00
BTC.CompareBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked", false)
2024-09-24 17:33:08 +02:00
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option1Button")
2024-09-19 17:27:15 +02:00
BTC.Hide("GO.HANDMENU.Option1Button")
2024-07-19 19:56:36 +02:00
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
}
}
}
}
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) {
BTC.Run("AudioSource.AUDIO.Kueche1FKochenAnza")
// Frage beantworten
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) {
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "sehr oft")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "selten")
BTC.Show("GO.HANDMENU.Option2Button")
}
Composite(Race) {
Composite(Sequence) {
// sehr oft
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option2Button")
2024-09-19 17:27:15 +02:00
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Selbststaendig_Kochen")
}
Composite(Sequence) {
// selten
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option1Button")
2024-09-19 17:27:15 +02:00
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
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)
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-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) {
2024-07-30 17:25:03 +02:00
BTC.Run("AudioSource.AUDIO.Kueche1FZusammenKo")
// Risotto in Topf geben
BTC.Run("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
2024-07-30 17:25:03 +02:00
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Risotto")
BTC.Run("Collider.INTERACTABLES.Topf")
// Ruehren
BTC.Run("NamedGrabEvent.INTERACTABLES.Loeffel")
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Loeffel")
BTC.Run("Collider.INTERACTABLES.Topf")
// Wie lange ruehren?
BTC.Wait(2)
2024-07-30 17:25:03 +02:00
BTC.Run("AudioSource.AUDIO.Kueche2FZusammenKo")
// Wein leuchtet
BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
2024-07-30 17:25:03 +02:00
// Wein greifen
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
2024-07-30 17:25:03 +02:00
// Wein in Topf giessen
// ...
BTC.Run("AudioSource.AUDIO.Kueche3FZusammenKo")
// Bouillon leuchtet
BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
2024-07-30 17:25:03 +02:00
// Bouillon greifen
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
2024-07-30 17:25:03 +02:00
// Bouillon in Topf geben
// ...
BTC.Run("AudioSource.AUDIO.Kueche4FZusammenKo")
// Glas Wasser mit Steinpilze in Topf geben
BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Steinpilze")
2024-07-30 17:25:03 +02:00
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Steinpilze")
BTC.Run("Collider.INTERACTABLES.Topf")
RunTree("32_Grotto_Kueche_Parmigiano")
}
}
Tree("32_Grotto_Kueche_Selbststaendig_Kochen") {
2024-09-19 17:27:15 +02:00
// --- Kueche - Selbststaendig Kochen ---
Composite(Sequence) {
BTC.Run("AudioSource.AUDIO.Kueche1FSelbststae")
// Selbstaendig kochen...
// ...
RunTree("32_Grotto_Kueche_Parmigiano")
}
}
Tree("32_Grotto_Kueche_Parmigiano") {
2024-09-19 17:27:15 +02:00
// --- Kueche - Parmigiano ---
Composite(Sequence) {
BTC.SynthesizeText("Schau, ich habe dir den Parmigiano hingestellt. Du kannst ihn nun in den Topf geben.")
2024-09-24 17:33:08 +02:00
BTC.SpeechOutputEnded()
// Parmigiano in Topf geben
BTC.Run("NamedGrabEvent.INTERACTABLES.Parmigiano")
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Parmigiano")
BTC.Run("Collider.INTERACTABLES.Topf")
BTC.SynthesizeText("Bist du fertig?")
2024-09-24 17:33:08 +02:00
BTC.SpeechOutputEnded()
// Antwort User
2024-09-24 17:33:08 +02:00
// ToDo: Sprache fehlt
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Ja")
BTC.Show("GO.HANDMENU.Option1Button")
Composite(Race) {
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Wait(5)
}
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.SynthesizeText("Bitte stelle den Risotto hier hin.")
2024-09-24 17:33:08 +02:00
BTC.SpeechOutputEnded()
// Stelle für Pfanne leuchtet
BTC.Enable("Collider/NamedOutline.INTERACTABLES.TopfUntersetzer")
2024-07-30 17:25:03 +02:00
// Pfanne rueber stellen
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-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")
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
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
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Mein Name ist User.")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button")
}
}
}
// -- Race 2: User sagt nichts
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
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-07-19 19:56:36 +02:00
}
2024-12-04 17:23:07 +01:00
Tree("32_Grotto_Im_Grotto_Essen_Intro") {
}
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")
BTC.Run("LoadScene.NEXT.35Slideshow")
}
}