Tree("Root") {
    Composite(Sequence) {
        BTC.InitializeSpeechManager()
        RunTree("32_Grotto_Kueche_Intro")
        RunTree("32_Grotto_Kueche_Zwiebeln_schneiden")
        RunTree("32_Grotto_Kueche_alles_gefunden")
        //RunTree("32_Grotto_Kueche_Kochen_Anzahl")
        //RunTree("32_Grotto_Kueche_Zusammen_Kochen")
        
        //RunTree("32_Grotto_Story_B_Grotto")
    }
}

Tree("32_Grotto_Story_B_Grotto") {
// --- Story B Grotto - Antwort Reise ---
    Composite(Sequence) {
        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?", "de-DE", "")
        BTC.SpeechOutputEnded()

        //BTC.SetSpeechRecognitionLanguage("it-IT")
        //BTC.AddPossbileSpeechIntent("Story_B_Grotto.Nachfrage_Nonna_Grotto.2", "L’aiuto in cucina.")
        //BTC.AddPossbileSpeechIntent("Story_B_Grotto.Nachfrage_Nonna_Grotto.4", "Preferisco aspettarla nella sala del grotto. Non so cucinare.")

        BTC.AddPossbileSpeechIntent("Story_B_Grotto.Nachfrage_Nonna_Grotto.2", "Ich helfe in der Küche.")
        BTC.AddPossbileSpeechIntent("Story_B_Grotto.Nachfrage_Nonna_Grotto.4", "Ich warte im Garten auf sie.")
        BTC.StartSpeechIntentRecognition()

        Composite(Race) {
            // -- Race 1: User sagt etwas
            Composite(Sequence) {
                BTC.UserStartedSpeechInput()
                
                Composite(Selector) {
                    // -- Selector 1: Intent erkannt
                    Composite(Sequence) {
                        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")
                            }
                        }
                    }

                    // -- 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?", "de-DE", "")
                        BTC.SpeechOutputEnded()
                
                        BTC.StartSpeechIntentRecognition()
                        // Fallback fehlt, wenn nichts gesagt wird
                        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")
                            }
                        }
                    }

                    // Fallback 2mal nicht verstanden: Button klick

                }
            }

            // -- Race 2: User sagt nichts
            Composite(Sequence) {
                BTC.Wait(5)
                BTC.CompareUserSpeechInputStarted(false)
                BTC.AbortSpeechEventListener()
                BTC.StopSpeechIntentRecognition()
                BTC.ClearPossbileSpeechIntents()

                // --- Bilder Bergell ---
                //BTC.Run("LoadScene.NEXT.35Slideshow")
            }
        }
    }
}

Tree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche") {
// --- Story B Grotto - Antwort Nonna Kueche ---
    Composite(Sequence) {
        BTC.SynthesizeText("Oh, das ist wunderbar, vielen Dank! Anschliessend seid ihr selbstverständlich zum Essen eingeladen.", "de-DE", "")
        BTC.SpeechOutputEnded()

        //BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Nonna_Kueche.2", "Tante grazie, è molto gentile da parte Sua (o altra risposta).")
        BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Nonna_Kueche.2", "Vielen Dank, das ist nett (oder andere Antwort)")
        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 - Outro ---
        // ...
    }
}

Tree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto") {
// --- Story B Grotto - Antwort Nonna Grotto ---
    Composite(Sequence) {
        BTC.SynthesizeText("Okay gut, mach es dir gemütlich. Hast du etwas zum Lesen dabei?", "de-DE", "")
        BTC.SpeechOutputEnded()

        //BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Nonna_Grotto.2", "Sì, grazie, ho qualcosa con me (o un'altra risposta)")
        BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Nonna_Grotto.2", "Ja, danke, ich habe etwas dabei (oder andere Antwort)")
        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("Prima, viel Spass noch und dann guten Appetit!", "de-DE", "")
        BTC.SpeechOutputEnded()

        //BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Nonna_Grotto.6", "Grazie nonna, ciao!")
        BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Nonna_Grotto.6", "Danke!")
        BTC.StartSpeechIntentRecognition()

        Composite(Race) {
            // -- Race 1: User sagt etwas
            Composite(Selector) {
                Composite(Sequence) {
                    BTC.UserStartedSpeechInput()
                    BTC.SpeechIntentRecognized()
                    BTC.ClearPossbileSpeechIntents()
                    //BTC.GetKeyDown("Return")
                }

                // Intent nicht erkannt
                Composite(Sequence) {
                    BTC.ClearPossbileSpeechIntents()
                    //BTC.GetKeyDown("Return")
                }
            }

            // -- Race 2: User sagt nichts
            Composite(Sequence) {
                BTC.Wait(5)
                BTC.CompareUserSpeechInputStarted(false)
                BTC.StopSpeechIntentRecognition()
                BTC.ClearPossbileSpeechIntents()
            }
        }
    }
}

Tree("32_Grotto_Kueche_Intro") {
// --- Kueche - Intro ---
    Composite(Sequence) {
        BTC.Run("AudioSource.AUDIO.Kueche1FIntro")

        // Schuerze greifen
        //BTC.GetKeyDown("Return")
        BTC.Run("GO/NamedGrabEvent.INTERACTABLES.Schuerze")
        BTC.Hide("GO/NamedGrabEvent.INTERACTABLES.Schuerze")

        //BTC.Run("AudioSource.AUDIO.Kueche2FIntro")
        BTC.SynthesizeText("Lies mir bitte das Rezept vor.", "de-DE", "")
        BTC.SpeechOutputEnded()

        // Rezept vorlesen: Button Klick
        BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Rezept vorlesen")
        BTC.Show("GO.HANDMENU.Option1Button")

        Composite(Race) {
            Composite(Sequence) {
                // auf Button klicken
                BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
                //BTC.GetKeyDown("Return")
            }
            Composite(Sequence) {
                // keine Reaktion
                BTC.Wait(5)
                BTC.SynthesizeText("Was brauchen wir? Bitte lies mir das Rezept vor.", "de-DE", "")
                BTC.SpeechOutputEnded()
                BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
            }
        }
        BTC.Hide("GO.HANDMENU.Option1Button")


        BTC.Run("AudioSource.AUDIO.Kueche3FIntro")
        // Pilze leuchten
        BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Steinpilze")

        Composite(Race) {
            Composite(Sequence) {
                // Pilze ins Wasser Glas legen
                BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Steinpilze")
                BTC.Set("Collider.INTERACTABLES.GlassWasserTrigger", "otherTag", "Steinpilze")
                BTC.Run("Collider.INTERACTABLES.GlassWasserTrigger")
            }
            Composite(Sequence) {
                // Keine Reaction
                BTC.Wait(5)
                // --- Kueche - Steinpilze Hilfe ---
                BTC.Run("AudioSource.AUDIO.Kueche1FSteinpilze")
                // Pilze ins Wasser Glas legen
                BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Steinpilze")
                BTC.Set("Collider.INTERACTABLES.GlassWasserTrigger", "otherTag", "Steinpilze")
                BTC.Run("Collider.INTERACTABLES.GlassWasserTrigger")
            }
        }
        BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Steinpilze")
    } 
}

Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
// --- Kueche - Zwiebeln schneiden ---
    Composite(Sequence) {
        BTC.Run("AudioSource.AUDIO.Kueche1FZwiebelnsc")

        // Zwiebeln schneiden
        // ...

        BTC.Run("AudioSource.AUDIO.Kueche2FZwiebelnsc")

        // Zutaten leuchten
        Composite(Marathon) {
            BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
            BTC.Show("GO/NamedSocketEvent.SOCKETS.BouillonSocket")
            BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
            BTC.Show("GO/NamedSocketEvent.SOCKETS.WeissweinSocket")
            BTC.Enable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
            BTC.Show("GO/NamedSocketEvent.SOCKETS.RisottoSocket")
            BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel")
            BTC.Show("GO/NamedSocketEvent.SOCKETS.OlivenoelSocket")
            BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer")
            BTC.Show("GO/NamedSocketEvent.SOCKETS.PfefferSocket")
            BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Salz")
            BTC.Show("GO/NamedSocketEvent.SOCKETS.SalzSocket")
        }
        

        // Zutaten auf die Arbeitsflaeche legen mithilfe Sockets
        Composite(Marathon) {
            
            Decorator (RepeatUntilFailed) {
               Decorator(Inverter) {
                    Composite(Sequence) {
                        BTC.Run("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
                        //BTC.GetKeyDown("Return")

                        Composite(Race) {
                            Composite(Sequence) {
                                // Success
                                BTC.Run("GO/NamedSocketEvent.SOCKETS.RisottoSocket")
                                //BTC.GetKeyDown("Return")
                                BTC.SetBool("RisottoIsSnapped")
                                BTC.Disable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
                            }
                            Composite(Sequence) {
                                // Fail
                                //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.", "de-DE", "")
                                BTC.SpeechOutputEnded()
                                BTC.SetBool("RisottoIsSnapped", false)
                            }
                        }

                        BTC.CompareBool("RisottoIsSnapped")
                    } // Sequence
                 }
            } // Repeat
            

            Composite(Sequence) {
                BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Salz")
                BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Salz")
                BTC.Run("GO/NamedSocketEvent.SOCKETS.SalzSocket")
            }
            Composite(Sequence) {
                
                BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer")
                BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer")
                BTC.Run("GO/NamedSocketEvent.SOCKETS.PfefferSocket")
            }
            Composite(Sequence) {
                
                BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
                BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
                BTC.Run("GO/NamedSocketEvent.SOCKETS.WeissweinSocket")
            }
            Composite(Sequence) {
                
                BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
                BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
                BTC.Run("GO/NamedSocketEvent.SOCKETS.BouillonSocket")
            }
            Composite(Sequence) {
                
                BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel")
                BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel")
                BTC.Run("GO/NamedSocketEvent.SOCKETS.OlivenoelSocket")
            }
        }

        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")
        }
       
    }
}


Tree("32_Grotto_Kueche_alles_gefunden") {
// --- Kueche - alles gefunden ---
    Composite(Sequence) {
        BTC.SynthesizeText("Super, du hast alles gefunden. Bitte gib nun etwas Olivenöl in den Topf.", "de-DE", "")
        BTC.SpeechOutputEnded()

        // Oel in Topf geben - Particle Trigger
        // ...
        BTC.Run("AudioSource.AUDIO.Kueche2Fallesgefun")
        //BTC.GetKeyDown("Return")

        // 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")

        // Frage beantworten
        BTC.AddPossbileSpeechIntent("Kueche.alles_gefunden.4", "Ja.")
        BTC.AddPossbileSpeechIntent("Kueche.alles_gefunden.6", "Nein.")
        BTC.StartSpeechIntentRecognition()

        Composite(Race) {
            // -- Race 1: User sagt etwas
            Composite(Sequence) {
                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")
                                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")
                                BTC.Hide("GO.HANDMENU.Option1Button")
                                BTC.Hide("GO.HANDMENU.Option2Button")
                                RunTree("32_Grotto_Kueche_Zusammen_Kochen")
                            }
                        }
                    }
                }
            }

            // -- Race 2: User sagt nichts
            Composite(Sequence) {
                BTC.Wait(5)
                BTC.CompareUserSpeechInputStarted(false)
                BTC.AbortSpeechEventListener()
                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")
                        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")
                        BTC.Hide("GO.HANDMENU.Option1Button")
                        BTC.Hide("GO.HANDMENU.Option2Button")
                        RunTree("32_Grotto_Kueche_Zusammen_Kochen")
                    }
                }
            }
        }        
    }
}

Tree("32_Grotto_Kueche_Interesse_Kochen") {
// --- Kueche - Interesse Kochen ---
    Composite(Sequence) {
        BTC.Run("AudioSource.AUDIO.Kueche1FInteresseK")
        BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Lasagne")
        BTC.Show("GO.HANDMENU.Option1Button")
        BTC.SetBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked", false)

        Composite(Race) {
            Composite(Sequence) {
                // Lieblingsessen nennen
                BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
                BTC.SetBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked")
                BTC.Hide("GO.HANDMENU.Option1Button")
                RunTree("32_Grotto_Kueche_Kochen_Anzahl")
            }
            Composite(Sequence) {
                // keine Antwort
                BTC.Wait(5)
                BTC.CompareBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked", false)
                BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option1Button")
                BTC.Hide("GO.HANDMENU.Option1Button")
                RunTree("32_Grotto_Kueche_Zusammen_Kochen")
            }
        }
    }
}

Tree("32_Grotto_Kueche_Kochen_Anzahl") {
// --- Kueche - Kochen Anzahl ---
    Composite(Sequence) {
        BTC.Run("AudioSource.AUDIO.Kueche1FKochenAnza")

        // Frage beantworten
        BTC.AddPossbileSpeechIntent("Kueche.Kochen_Anzahl.2", "sehr oft, fast täglich (oder andere Antwort)")
        BTC.AddPossbileSpeechIntent("Kueche.Kochen_Anzahl.4", "fast nie (oder andere Antwort)")
        BTC.StartSpeechIntentRecognition()

        Composite(Race) {
            // -- Race 1: User sagt etwas
            Composite(Sequence) {
                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")
                                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")
                                BTC.Hide("GO.HANDMENU.Option1Button")
                                BTC.Hide("GO.HANDMENU.Option2Button")
                                RunTree("32_Grotto_Kueche_Zusammen_Kochen")
                            }
                        }
                    }
                }
            }

            // -- Race 2: User sagt nichts
            Composite(Sequence) {
                BTC.Wait(5)
                BTC.CompareUserSpeechInputStarted(false)
                BTC.AbortSpeechEventListener()
                BTC.StopSpeechIntentRecognition()
                BTC.ClearPossbileSpeechIntents()
                RunTree("32_Grotto_Kueche_Zusammen_Kochen")
            }
        }        
    }
}

Tree("32_Grotto_Kueche_Zusammen_Kochen") {
// --- Kueche - Zusammen Kochen ---
    Composite(Sequence) {
        BTC.Run("AudioSource.AUDIO.Kueche1FZusammenKo")

        // Risotto in Topf geben
        BTC.Run("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
        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)
        BTC.Run("AudioSource.AUDIO.Kueche2FZusammenKo")

        // Wein leuchtet
        BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")

        // Wein greifen
        BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
        BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein")
        
        // Wein in Topf giessen
        // ...
        BTC.Run("AudioSource.AUDIO.Kueche3FZusammenKo")

        // Bouillon leuchtet
        BTC.Enable("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")

        // Bouillon greifen
        BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")
        BTC.Disable("NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon")

        // Bouillon in Topf geben
        // ...
        BTC.Run("AudioSource.AUDIO.Kueche4FZusammenKo")

        // Glas Wasser mit Steinpilze in Topf geben
        BTC.Run("NamedGrabEvent/NamedOutline.INTERACTABLES.Steinpilze")
        BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Steinpilze")
        BTC.Run("Collider.INTERACTABLES.Topf")

        RunTree("32_Grotto_Kueche_Parmigiano")
    }
}

Tree("32_Grotto_Kueche_Selbststaendig_Kochen") {
// --- Kueche - Selbststaendig Kochen ---
    Composite(Sequence) {
        BTC.Run("AudioSource.AUDIO.Kueche1FSelbststae")
        // Selbstaendig kochen...
        // ...

        RunTree("32_Grotto_Kueche_Parmigiano")
    }
}

Tree("32_Grotto_Kueche_Parmigiano") {
// --- Kueche - Parmigiano ---
    Composite(Sequence) {
        BTC.SynthesizeText("Schau, ich habe dir den Parmigiano hingestellt. Du kannst ihn nun in den Topf geben.", "de-DE", "")
        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?", "de-DE", "")
        BTC.SpeechOutputEnded()

        // Antwort User
        // 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.", "de-DE", "")
        BTC.SpeechOutputEnded()

        // Stelle für Pfanne leuchtet
        BTC.Enable("Collider/NamedOutline.INTERACTABLES.TopfUntersetzer")

        // 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")
        // ToDo: Fallback Keine Reaktion 

        BTC.Run("AudioSource.AUDIO.Kueche5FZusammenKo")
        BTC.Run("AudioSource.AUDIO.Kueche6FZusammenKo")

        // --- Kueche - Outro ---
        BTC.Run("AudioSource.AUDIO.Kueche1GOutro")
        BTC.SynthesizeText("Ich bin Giuseppe, Francescas Grossonkel. Und wer bist du?", "de-DE", "")
        BTC.SpeechOutputEnded()

        // Name sagen
        BTC.AddPossbileSpeechIntent("Kueche.Outro.4", "Mein Name ist xy. (oder andere Antwort)")
        BTC.StartSpeechIntentRecognition()

        Composite(Race) {
            // -- 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()
                BTC.StopSpeechIntentRecognition()
                BTC.ClearPossbileSpeechIntents()
            }
        }        

        BTC.Run("AudioSource.AUDIO.Kueche3GOutro")
        BTC.Run("AudioSource.AUDIO.Kueche2GOutro")
    }
}

Tree("32_Grotto_Kueche_Hide") {
    Composite(Sequence) {
        // Go to scene 3.5 Slideshow
        BTC.GetKeyDown("Return")
        BTC.Run("LoadScene.NEXT.35Slideshow")
    }
}