Tree("Root") { Composite(Sequence) { BTC.InitializeSpeechManager() BTC.SetSpeechRecognitionLanguage("it-IT") BTC.SetVoiceName("it-IT-FabiolaNeural") Composite(Race) { Composite(Sequence) { // Error in Speech Service: Cancel BTC Trees BTC.SpeechErrorOccured() BTC.SetBool("error") } Composite(Sequence) { BTC.FadeIn("FadeScene.XRInteractionHandsSetup.Black") RunTree("32_Grotto_Kueche_Intro") //RunTree("32_Grotto_Kueche_Zwiebeln_schneiden") //RunTree("32_Grotto_Kueche_alles_gefunden") //RunTree("32_Grotto_Kueche_Interesse_Kochen") //RunTree("32_Grotto_Kueche_Kochen_Anzahl") //RunTree("32_Grotto_Kueche_Zusammen_Kochen") //RunTree("32_Grotto_Kueche_Parmigiano") } } Composite(Sequence) { BTC.CompareBool("error") // Error Handling BTC.AbortSpeechEventListener() BTC.StopSpeechIntentRecognition() BTC.ClearPossbileSpeechIntents() BTC.Show("GO.GO.SpeechButton") BTC.Set("TextMeshPro.GO.Option1Button", "text", "Restart") BTC.Show("GO.GO.Option1Button") BTC.Run("NamedEventTrigger.GO.Option1Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") } } } Tree("32_Grotto_Kueche_Intro") { // --- Kueche - Intro --- Composite(Sequence) { BTC.Show("Depthkit.VIDEOS.Intro1Kueche") BTC.Run("Depthkit.VIDEOS.Intro1Kueche") BTC.Hide("Depthkit.VIDEOS.Intro1Kueche") // Schuerze greifen BTC.Run("GO/NamedGrabEvent.INTERACTABLES.Schuerze") BTC.Hide("GO/NamedGrabEvent.INTERACTABLES.Schuerze") BTC.Show("Depthkit.VIDEOS.Intro2Kueche") BTC.Run("Depthkit.VIDEOS.Intro2Kueche") BTC.Hide("Depthkit.VIDEOS.Intro2Kueche") BTC.AddPossbileSpeechIntent("Kueche.Intro.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) { Decorator(Inverter) { BTC.CompareUserSpeechInputStarted(false) } BTC.ClearPossbileSpeechIntents() } } // -- Race 2: User sagt nichts Composite(Sequence) { BTC.Wait(5) BTC.CompareUserSpeechInputStarted(false) BTC.AbortSpeechEventListener() BTC.StopSpeechIntentRecognition() BTC.Show("Depthkit.VIDEOS.leggi") BTC.Run("Depthkit.VIDEOS.leggi") BTC.Hide("Depthkit.VIDEOS.leggi") 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() } } } } BTC.Show("Depthkit.VIDEOS.Intro5Kueche") BTC.Run("Depthkit.VIDEOS.Intro5Kueche") BTC.Hide("Depthkit.VIDEOS.Intro5Kueche") // Pilze leuchten Composite(Marathon) { BTC.Enable("NamedOutline.INTERACTABLES.Pilz01") BTC.Enable("NamedOutline.INTERACTABLES.Pilz02") BTC.Enable("NamedOutline.INTERACTABLES.Pilz03") BTC.Set("Collider.INTERACTABLES.GlassWasserTrigger", "otherTag", "Steinpilze") } Composite(Race) { Composite(Sequence) { // Pilze ins Wasser Glas legen BTC.Run("Collider.INTERACTABLES.GlassWasserTrigger") BTC.Run("Collider.INTERACTABLES.GlassWasserTrigger") BTC.Run("Collider.INTERACTABLES.GlassWasserTrigger") } Composite(Sequence) { // Keine Reaction BTC.Wait(30) // --- Kueche - Steinpilze Hilfe --- BTC.Show("Depthkit.VIDEOS.SteinpilzeHilfe1Ku") BTC.Run("Depthkit.VIDEOS.SteinpilzeHilfe1Ku") BTC.Hide("Depthkit.VIDEOS.SteinpilzeHilfe1Ku") // Pilze ins Wasser Glas legen BTC.Run("Collider.INTERACTABLES.GlassWasserTrigger") BTC.Run("Collider.INTERACTABLES.GlassWasserTrigger") BTC.Run("Collider.INTERACTABLES.GlassWasserTrigger") } } Composite(Marathon) { BTC.Hide("Depthkit.VIDEOS.SteinpilzeHilfe1Ku") BTC.Show("GO.STATIC.RezeptCheckmark1") BTC.Disable("NamedOutline.INTERACTABLES.Pilz01") BTC.Disable("NamedOutline.INTERACTABLES.Pilz02") BTC.Disable("NamedOutline.INTERACTABLES.Pilz03") } RunTree("32_Grotto_Kueche_Zwiebeln_schneiden") } } Tree("32_Grotto_Kueche_Zwiebeln_schneiden") { // --- Kueche - Zwiebeln schneiden --- Composite(Sequence) { BTC.Show("Depthkit.VIDEOS.Zwiebelnschneiden1") BTC.Run("Depthkit.VIDEOS.Zwiebelnschneiden1") BTC.Hide("Depthkit.VIDEOS.Zwiebelnschneiden1") // Zwiebeln schneiden BTC.FindObjectsByTag("SlicedZwiebel", 6) BTC.Show("GO.STATIC.RezeptCheckmark2") BTC.Show("Depthkit.VIDEOS.Zwiebelnschneiden2") BTC.Run("Depthkit.VIDEOS.Zwiebelnschneiden2") BTC.Hide("Depthkit.VIDEOS.Zwiebelnschneiden2") // Zutaten leuchten Composite(Marathon) { BTC.Enable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon") BTC.Show("GO/NamedSocketEvent.SOCKETS.BouillonSocket") BTC.Enable("GO/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("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel") BTC.Show("GO/NamedSocketEvent.SOCKETS.OlivenoelSocket") BTC.Enable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer") BTC.Show("GO/NamedSocketEvent.SOCKETS.PfefferSocket") BTC.Enable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Salz") BTC.Show("GO/NamedSocketEvent.SOCKETS.SalzSocket") } // Zutaten auf die Arbeitsflaeche legen mithilfe Sockets Composite(Marathon) { // Risotto Composite(Sequence) { //BTC.GetKeyDown("Return") BTC.SetBool("RisottoIsSnapped", false) Composite(Race) { Composite(Sequence) { // Success BTC.Run("GO/NamedSocketEvent.SOCKETS.RisottoSocket") BTC.SetBool("RisottoIsSnapped") BTC.Disable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto") BTC.Hide("GO/NamedSocketEvent.SOCKETS.RisottoSocket") } Decorator(Repeat) { Composite(Sequence) { // Fail BTC.ListenToEvent("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto") BTC.Wait(1) BTC.CompareBool("RisottoIsSnapped", false) // Objekt geht zurueck BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto", -7.920319, 0.9762855, -16.10492) BTC.Show("Depthkit.VIDEOS.Zwiebelnschneiden5") BTC.Run("Depthkit.VIDEOS.Zwiebelnschneiden5") BTC.Hide("Depthkit.VIDEOS.Zwiebelnschneiden5") } } } } // Sequence // Salz Composite(Sequence) { 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") BTC.Hide("GO/NamedSocketEvent.SOCKETS.SalzSocket") } Decorator(Repeat) { Composite(Sequence) { // Fail BTC.ListenToEvent("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Salz") BTC.Wait(1) BTC.CompareBool("SalzIsSnapped", false) // Objekt geht zurueck BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Salz", -7.94902, 0.9696183, -16.31448) BTC.Show("Depthkit.VIDEOS.Zwiebelnschneiden5") BTC.Run("Depthkit.VIDEOS.Zwiebelnschneiden5") BTC.Hide("Depthkit.VIDEOS.Zwiebelnschneiden5") } } } } // Sequence // Pfeffer Composite(Sequence) { 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") BTC.Hide("GO/NamedSocketEvent.SOCKETS.PfefferSocket") } Decorator(Repeat) { Composite(Sequence) { // Fail BTC.ListenToEvent("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer") BTC.Wait(1) BTC.CompareBool("PfefferIsSnapped", false) // Objekt geht zurueck BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Pfeffer", -7.923509, 0.976778, -16.23407) BTC.Show("Depthkit.VIDEOS.Zwiebelnschneiden5") BTC.Run("Depthkit.VIDEOS.Zwiebelnschneiden5") BTC.Hide("Depthkit.VIDEOS.Zwiebelnschneiden5") } } } } // Sequence // Weisswein Composite(Sequence) { 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") BTC.Hide("GO/NamedSocketEvent.SOCKETS.WeissweinSocket") } Decorator(Repeat) { Composite(Sequence) { // Fail BTC.ListenToEvent("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein") BTC.Wait(1) BTC.CompareBool("WeissweinIsSnapped", false) // Objekt geht zurueck BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Weisswein", -8.098644, 0.9762855, -16.33541) BTC.Show("Depthkit.VIDEOS.Zwiebelnschneiden5") BTC.Run("Depthkit.VIDEOS.Zwiebelnschneiden5") BTC.Hide("Depthkit.VIDEOS.Zwiebelnschneiden5") } } } } // Sequence // Bouillon Composite(Sequence) { 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") BTC.Hide("GO/NamedSocketEvent.SOCKETS.BouillonSocket") } Decorator(Repeat) { Composite(Sequence) { // Fail BTC.ListenToEvent("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon") BTC.Wait(1) BTC.CompareBool("BouillonIsSnapped", false) // Objekt geht zurueck BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Bouillon", -8.082785, 0.9762855, -15.99537) BTC.Show("Depthkit.VIDEOS.Zwiebelnschneiden5") BTC.Run("Depthkit.VIDEOS.Zwiebelnschneiden5") BTC.Hide("Depthkit.VIDEOS.Zwiebelnschneiden5") } } } } // Sequence // Olivenoel Composite(Sequence) { 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") BTC.Hide("GO/NamedSocketEvent.SOCKETS.OlivenoelSocket") } Decorator(Repeat) { Composite(Sequence) { // Fail BTC.ListenToEvent("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel") BTC.Wait(1) BTC.CompareBool("OlivenoelIsSnapped", false) // Objekt geht zurueck BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Olivenoel", -8.0905, 0.9762856, -16.20448) BTC.Show("Depthkit.VIDEOS.Zwiebelnschneiden5") BTC.Run("Depthkit.VIDEOS.Zwiebelnschneiden5") BTC.Hide("Depthkit.VIDEOS.Zwiebelnschneiden5") } } } } // Sequence } BTC.Wait(1) BTC.Hide("Depthkit.VIDEOS.Zwiebelnschneiden5") RunTree("32_Grotto_Kueche_alles_gefunden") } } Tree("32_Grotto_Kueche_alles_gefunden") { // --- Kueche - alles gefunden --- Composite(Sequence) { BTC.Show("Depthkit.VIDEOS.allesgefunden1Kuec") BTC.Run("Depthkit.VIDEOS.allesgefunden1Kuec") BTC.Hide("Depthkit.VIDEOS.allesgefunden1Kuec") // Oel in Topf geben BTC.Run("Particle.INTERACTABLES.Olivenoel") BTC.Show("GO.STATIC.RezeptCheckmark3") BTC.Show("Depthkit.VIDEOS.allesgefunden2Kuec") BTC.Run("Depthkit.VIDEOS.allesgefunden2Kuec") BTC.Hide("Depthkit.VIDEOS.allesgefunden2Kuec") // Herd anstellen - ToDo: Handling in Story? //BTC.Run("NamedGrabEvent.STATIC.Herdschalter") //BTC.Run("StudioEventEmitter.STATIC.HerdplatteAnstelle") // Zwiebeln in Topf geben BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "SlicedZwiebel") BTC.Run("Collider.INTERACTABLES.Topf") BTC.Run("StudioEventEmitter.INTERACTABLES.ZwiebelnInTopf") BTC.Show("GO.STATIC.RezeptCheckmark4") BTC.Show("Depthkit.VIDEOS.allesgefunden3Kuec") BTC.Run("Depthkit.VIDEOS.allesgefunden3Kuec") BTC.Hide("Depthkit.VIDEOS.allesgefunden3Kuec") // Frage beantworten BTC.AddPossbileSpeechIntent("Kueche.alles_gefunden.4") BTC.AddPossbileSpeechIntent("Kueche.alles_gefunden.6") 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.Show("GO.GO.SpeechButton") BTC.Set("TextMeshPro.GO.Option1Button", "text", "Sì.") BTC.Show("GO.GO.Option1Button") BTC.Set("TextMeshPro.GO.Option2Button", "text", "No.") BTC.Show("GO.GO.Option2Button") } Composite(Race) { Composite(Sequence) { // Ja BTC.Run("NamedEventTrigger.GO.Option1Button") BTC.AbortEventListener("NamedEventTrigger.GO.Option2Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.Option2Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") RunTree("32_Grotto_Kueche_Interesse_Kochen") } Composite(Sequence) { // Nein BTC.Run("NamedEventTrigger.GO.Option2Button") BTC.AbortEventListener("NamedEventTrigger.GO.Option1Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.Option2Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") 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.Show("GO.GO.SpeechButton") BTC.Set("TextMeshPro.GO.Option1Button", "text", "Sì.") BTC.Show("GO.GO.Option1Button") BTC.Set("TextMeshPro.GO.Option2Button", "text", "No.") BTC.Show("GO.GO.Option2Button") } Composite(Race) { Composite(Sequence) { // Ja BTC.Run("NamedEventTrigger.GO.Option1Button") BTC.AbortEventListener("NamedEventTrigger.GO.Option2Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.Option2Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") RunTree("32_Grotto_Kueche_Interesse_Kochen") } Composite(Sequence) { // Nein BTC.Run("NamedEventTrigger.GO.Option2Button") BTC.AbortEventListener("NamedEventTrigger.GO.Option1Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.Option2Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") RunTree("32_Grotto_Kueche_Zusammen_Kochen") } } } } } } Tree("32_Grotto_Kueche_Interesse_Kochen") { // --- Kueche - Interesse Kochen --- Composite(Sequence) { BTC.Show("Depthkit.VIDEOS.InteresseKochen1Ku") BTC.Run("Depthkit.VIDEOS.InteresseKochen1Ku") BTC.Hide("Depthkit.VIDEOS.InteresseKochen1Ku") // Frage beantworten BTC.AddPossbileSpeechIntent("Kueche.Interesse_Kochen.2") 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 BTC.ClearPossbileSpeechIntents() RunTree("32_Grotto_Kueche_Kochen_Anzahl") } // -- Selector 2: Intent nicht erkannt Composite(Sequence) { BTC.ClearPossbileSpeechIntents() RunTree("32_Grotto_Kueche_Kochen_Anzahl") } } } // -- 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_Kochen_Anzahl") { // --- Kueche - Kochen Anzahl --- Composite(Sequence) { BTC.Show("Depthkit.VIDEOS.KochenAnzahl1Kuech") BTC.Run("Depthkit.VIDEOS.KochenAnzahl1Kuech") BTC.Hide("Depthkit.VIDEOS.KochenAnzahl1Kuech") // Frage beantworten BTC.AddPossbileSpeechIntent("Kueche.Kochen_Anzahl.2") BTC.AddPossbileSpeechIntent("Kueche.Kochen_Anzahl.4") 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") RunTree("32_Grotto_Kueche_Zusammen_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.Show("GO.GO.SpeechButton") BTC.Set("TextMeshPro.GO.Option1Button", "text", "molto spesso") BTC.Show("GO.GO.Option1Button") BTC.Set("TextMeshPro.GO.Option2Button", "text", "raramente") BTC.Show("GO.GO.Option2Button") } Composite(Race) { Composite(Sequence) { // sehr oft BTC.Run("NamedEventTrigger.GO.Option1Button") BTC.AbortEventListener("NamedEventTrigger.GO.Option2Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.Option2Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") //RunTree("32_Grotto_Kueche_Selbststaendig_Kochen") RunTree("32_Grotto_Kueche_Zusammen_Kochen") } Composite(Sequence) { // selten BTC.Run("NamedEventTrigger.GO.Option2Button") BTC.AbortEventListener("NamedEventTrigger.GO.Option1Button") BTC.Hide("GO.GO.Option1Button") BTC.Hide("GO.GO.Option2Button") BTC.Hide("GO.GO.SpeechButton") BTC.Show("GO.GO.Home") BTC.Hide("GO.GO.SpeechOptions") 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.Show("Depthkit.VIDEOS.ZusammenKochen1Kue") BTC.Run("Depthkit.VIDEOS.ZusammenKochen1Kue") BTC.Hide("Depthkit.VIDEOS.ZusammenKochen1Kue") // Risotto in Topf geben BTC.Run("GO/Particle.INTERACTABLES.Risotto") BTC.Hide("GO.INTERACTABLES.Reis") BTC.Hide("GO/Particle.INTERACTABLES.Risotto") BTC.Show("GO.STATIC.RezeptCheckmark5") // Ruehren BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Loeffel") BTC.Run("Collider.INTERACTABLES.Topf") BTC.Wait(2) // Wie lange ruehren? BTC.Show("Depthkit.VIDEOS.ZusammenKochen2Kue") BTC.Run("Depthkit.VIDEOS.ZusammenKochen2Kue") BTC.Hide("Depthkit.VIDEOS.ZusammenKochen2Kue") // Wein in Topf giessen BTC.Run("Particle.INTERACTABLES.Weisswein") BTC.StopSound("StudioEventEmitter.INTERACTABLES.ZwiebelnInTopf") BTC.Run("StudioEventEmitter.INTERACTABLES.Abloeschen") BTC.Show("GO.STATIC.RezeptCheckmark6") Composite(Marathon) { Composite(Sequence) { BTC.Wait(16) BTC.SetFloat("StudioEventEmitter.INTERACTABLES.Abloeschen", "blubbern.transition", 1) BTC.Show("GO.INTERACTABLES.ChangeSound") // Ruehren } Composite(Sequence) { BTC.Wait(5) BTC.Show("Depthkit.VIDEOS.ZusammenKochen3Kue") BTC.Run("Depthkit.VIDEOS.ZusammenKochen3Kue") BTC.Hide("Depthkit.VIDEOS.ZusammenKochen3Kue") } } // Bouillon in Topf geben BTC.Run("Particle.INTERACTABLES.Bouillon") BTC.Show("GO.STATIC.RezeptCheckmark7") BTC.Show("Depthkit.VIDEOS.ZusammenKochen4Kue") BTC.Run("Depthkit.VIDEOS.ZusammenKochen4Kue") BTC.Hide("Depthkit.VIDEOS.ZusammenKochen4Kue") // Glas Wasser mit Steinpilze in Topf geben BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Steinpilze") BTC.Run("Collider.INTERACTABLES.Topf") BTC.Show("GO.STATIC.RezeptCheckmark8") RunTree("32_Grotto_Kueche_Parmigiano") } } Tree("32_Grotto_Kueche_Parmigiano") { // --- Kueche - Parmigiano --- Composite(Sequence) { BTC.Show("Depthkit.VIDEOS.ZusammenKochen5Kue") BTC.Run("Depthkit.VIDEOS.ZusammenKochen5Kue") BTC.Hide("Depthkit.VIDEOS.ZusammenKochen5Kue") // Parmigiano in Topf geben BTC.Run("Particle.INTERACTABLES.Parmesan") BTC.Show("GO.STATIC.RezeptCheckmark9") BTC.Show("Depthkit.VIDEOS.ZusammenKochen6Kue") BTC.Run("Depthkit.VIDEOS.ZusammenKochen6Kue") BTC.Hide("Depthkit.VIDEOS.ZusammenKochen6Kue") // Antwort User BTC.AddPossbileSpeechIntent("Kueche.Zusammen_Kochen.6") 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 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() } } BTC.Show("Depthkit.VIDEOS.ZusammenKochen7Kue") BTC.Run("Depthkit.VIDEOS.ZusammenKochen7Kue") BTC.Hide("Depthkit.VIDEOS.ZusammenKochen7Kue") // Stelle für Pfanne leuchtet BTC.Enable("NamedOutline.INTERACTABLES.TopfUntersetzer") BTC.Set("Collider.INTERACTABLES.Topfuntersetzer", "otherTag", "Topf") Composite(Race) { Composite(Sequence) { // Pfanne rueber stellen BTC.Run("Collider.INTERACTABLES.Topfuntersetzer") } Composite(Sequence) { // Keine Reaction BTC.Wait(5) BTC.Show("Depthkit.VIDEOS.ZusammenKochen8Kue") BTC.Run("Depthkit.VIDEOS.ZusammenKochen8Kue") BTC.Hide("Depthkit.VIDEOS.ZusammenKochen8Kue") // Pfanne rueber stellen BTC.Run("Collider.INTERACTABLES.Topfuntersetzer") } } BTC.Hide("Depthkit.VIDEOS.ZusammenKochen8Kue") BTC.Disable("NamedOutline.INTERACTABLES.TopfUntersetzer") BTC.Show("Depthkit.VIDEOS.ZusammenKochen10Ku") BTC.Run("Depthkit.VIDEOS.ZusammenKochen10Ku") BTC.Hide("Depthkit.VIDEOS.ZusammenKochen10Ku") BTC.Show("Depthkit.VIDEOS.ZusammenKochen12Ku") BTC.Run("Depthkit.VIDEOS.ZusammenKochen12Ku") BTC.Hide("Depthkit.VIDEOS.ZusammenKochen12Ku") // --- Kueche - Outro --- BTC.Show("Depthkit.VIDEOS.Outro1Kueche") BTC.Run("Depthkit.VIDEOS.Outro1Kueche") BTC.Hide("Depthkit.VIDEOS.Outro1Kueche") BTC.Show("Depthkit.VIDEOS.Outro2Kueche") BTC.Run("Depthkit.VIDEOS.Outro2Kueche") BTC.Hide("Depthkit.VIDEOS.Outro2Kueche") // Name sagen BTC.AddPossbileSpeechIntent("Kueche.Outro.4") 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() } } } // -- Race 2: User sagt nichts Composite(Sequence) { BTC.Wait(5) BTC.CompareUserSpeechInputStarted(false) BTC.AbortSpeechEventListener() BTC.StopSpeechIntentRecognition() BTC.ClearPossbileSpeechIntents() } } BTC.Show("Depthkit.VIDEOS.Outro7Kueche") BTC.Run("Depthkit.VIDEOS.Outro7Kueche") BTC.Hide("Depthkit.VIDEOS.Outro7Kueche") BTC.Show("Depthkit.VIDEOS.Outro8Kueche") BTC.Run("Depthkit.VIDEOS.Outro8Kueche") BTC.Hide("Depthkit.VIDEOS.Outro8Kueche") BTC.FadeOut("FadeScene.XRInteractionHandsSetup.Black") BTC.Run("LoadScene.NEXT.32Grotto3") } }