1231 lines
47 KiB
Plaintext
1231 lines
47 KiB
Plaintext
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) {
|
|
RunTree("32_Grotto_Story_B_Grotto_Intro")
|
|
|
|
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_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")
|
|
}
|
|
}
|
|
}
|
|
|
|
Tree("32_Grotto_Story_B_Grotto_Intro") {
|
|
Composite(Sequence) {
|
|
BTC.Run("AudioSource.AUDIO.StoryBGrottoIntro1")
|
|
BTC.Run("AudioSource.AUDIO.StoryBGrottoIntro2")
|
|
|
|
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.Run("AudioSource.AUDIO.StoryBGrottoIntro6")
|
|
|
|
// --- Story B Grotto - Telefonat ---
|
|
BTC.Run("AudioSource.AUDIO.StoryBGrotto1Telef")
|
|
|
|
BTC.SynthesizeText("Ciao Francesca. Sei già arrivata?")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
BTC.Run("AudioSource.AUDIO.StoryBGrotto3Telef")
|
|
|
|
BTC.SynthesizeText("Oh, che bello, e chi è?")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
BTC.Run("AudioSource.AUDIO.StoryBGrotto5Telef")
|
|
|
|
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("Ciao, che bello che accompagni Francesca. Com'è andato il viaggio?")
|
|
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("Ti piace la Mesolcina?")
|
|
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("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?")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Reise.9")
|
|
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Reise.11")
|
|
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.Antwort_Reise.9")
|
|
BTC.ClearPossbileSpeechIntents()
|
|
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche")
|
|
}
|
|
Composite(Sequence) {
|
|
BTC.CompareIntentID("Story_B_Grotto.Antwort_Reise.11")
|
|
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("Che cosa volevi dire? Non ho capito. Preferisci aiutare o aspettare in giardino?")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
BTC.StartSpeechIntentRecognition()
|
|
Composite(Race) {
|
|
Composite(Sequence) {
|
|
BTC.UserStartedSpeechInput()
|
|
BTC.SpeechIntentRecognized()
|
|
|
|
Composite(Race) {
|
|
Composite(Sequence) {
|
|
BTC.CompareIntentID("Story_B_Grotto.Antwort_Reise.9")
|
|
BTC.ClearPossbileSpeechIntents()
|
|
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche")
|
|
}
|
|
Composite(Sequence) {
|
|
BTC.CompareIntentID("Story_B_Grotto.Antwort_Reise.11")
|
|
BTC.ClearPossbileSpeechIntents()
|
|
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto")
|
|
}
|
|
}
|
|
}
|
|
|
|
Composite(Sequence) {
|
|
BTC.Wait(5)
|
|
BTC.CompareUserSpeechInputStarted(false)
|
|
BTC.AbortSpeechEventListener()
|
|
BTC.StopSpeechIntentRecognition()
|
|
BTC.ClearPossbileSpeechIntents()
|
|
|
|
BTC.CompareUserSpeechInputStarted(true)
|
|
}
|
|
}
|
|
}
|
|
|
|
// Selector 3: Fallback Button
|
|
Composite(Sequence) {
|
|
Composite(Marathon) {
|
|
BTC.Set("TextMeshPro.GO.Option1Button", "text", "In der Küche helfen.")
|
|
BTC.Show("GO.GO.Option1Button")
|
|
BTC.Set("TextMeshPro.GO.Option2Button", "text", "Im Garten warten.")
|
|
BTC.Show("GO.GO.Option2Button")
|
|
}
|
|
|
|
Composite(Race) {
|
|
Composite(Sequence) {
|
|
// Kueche
|
|
BTC.Run("NamedEventTrigger.GO.Option1Button")
|
|
BTC.AbortEventListener("NamedEventTrigger.GO.Option2Button")
|
|
BTC.Hide("GO.GO.Option1Button")
|
|
BTC.Hide("GO.GO.Option2Button")
|
|
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche")
|
|
}
|
|
Composite(Sequence) {
|
|
// Garten
|
|
BTC.Run("NamedEventTrigger.GO.Option2Button")
|
|
BTC.AbortEventListener("NamedEventTrigger.GO.Option1Button")
|
|
BTC.Hide("GO.GO.Option1Button")
|
|
BTC.Hide("GO.GO.Option2Button")
|
|
RunTree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// -- Race 2: User sagt nichts
|
|
Composite(Sequence) {
|
|
BTC.Wait(5)
|
|
BTC.CompareUserSpeechInputStarted(false)
|
|
BTC.AbortSpeechEventListener()
|
|
BTC.StopSpeechIntentRecognition()
|
|
BTC.ClearPossbileSpeechIntents()
|
|
|
|
// --- Bilder Bergell ---
|
|
// TODO: 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.")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Nonna_Kueche.2")
|
|
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 ---
|
|
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")
|
|
}
|
|
}
|
|
|
|
Tree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Grotto") {
|
|
// --- Story B Grotto - Antwort Nonna Grotto ---
|
|
Composite(Sequence) {
|
|
BTC.SynthesizeText("Va bene. Forse puoi leggere qualcosa mentre aspetti Francesca nella sala del grotto. Hai portato qualche libro?")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Nonna_Grotto.2")
|
|
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.SynthesizeText("Ottimo, divertitevi, e buon appetito!")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Antwort_Nonna_Grotto.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.AbortSpeechEventListener()
|
|
BTC.StopSpeechIntentRecognition()
|
|
BTC.ClearPossbileSpeechIntents()
|
|
}
|
|
}
|
|
|
|
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.")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
// TODO: Option VR Brille Bilder und Buch anschauen fehlt
|
|
BTC.Wait(10)
|
|
|
|
// TODO: Szenenuebergang fehlt
|
|
BTC.Run("AudioSource.AUDIO.StoryBGrotto10Antw")
|
|
|
|
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.Run("AudioSource.AUDIO.StoryBGrotto15Antw")
|
|
|
|
RunTree("32_Grotto_Im_Grotto_Essen_Intro")
|
|
}
|
|
}
|
|
|
|
Tree("32_Grotto_Kueche_Intro") {
|
|
// --- Kueche - Intro ---
|
|
Composite(Sequence) {
|
|
// Initialization
|
|
BTC.Run("StudioEventEmitter.STATIC.Ambi3D")
|
|
|
|
BTC.Run("AudioSource.AUDIO.Kueche1FIntro")
|
|
|
|
// Schuerze greifen
|
|
BTC.Run("GO/NamedGrabEvent.INTERACTABLES.Schuerze")
|
|
BTC.Hide("GO/NamedGrabEvent.INTERACTABLES.Schuerze")
|
|
|
|
BTC.SynthesizeText("Lies mir bitte das Rezept vor.")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
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.SynthesizeText("Was brauchen wir? Bitte lies mir das Rezept vor.")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
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.Run("AudioSource.AUDIO.Kueche3FIntro")
|
|
|
|
// Pilze leuchten
|
|
// momentan nur 1 Pilz
|
|
BTC.Enable("NamedOutline.INTERACTABLES.Pilz01")
|
|
|
|
Composite(Race) {
|
|
Composite(Sequence) {
|
|
// Pilze ins Wasser Glas legen
|
|
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("Collider.INTERACTABLES.GlassWasserTrigger")
|
|
}
|
|
}
|
|
BTC.Disable("NamedOutline.INTERACTABLES.Pilz01")
|
|
}
|
|
}
|
|
|
|
Tree("32_Grotto_Kueche_Zwiebeln_schneiden") {
|
|
// --- Kueche - Zwiebeln schneiden ---
|
|
Composite(Sequence) {
|
|
BTC.SynthesizeText("Nun kannst du die Zwiebeln schneiden.")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
// Zwiebeln schneiden
|
|
BTC.Set("Collider.INTERACTABLES.ZwiebelTrigger", "otherTag", "Messer")
|
|
BTC.Run("Collider.INTERACTABLES.ZwiebelTrigger")
|
|
Composite(Marathon) {
|
|
BTC.Run("StudioEventEmitter.INTERACTABLES.ZwiebelSchneiden")
|
|
BTC.Hide("GO.INTERACTABLES.Zwiebel01")
|
|
BTC.Show("GO.INTERACTABLES.GeschnitteneZwiebe")
|
|
}
|
|
|
|
BTC.SynthesizeText("Bitte suche nun die anderen Zutaten zusammen. Ich räume in der Zwischenzeit ein bisschen auf.")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
// 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.GetKeyDown("Return")
|
|
BTC.SetBool("RisottoIsSnapped")
|
|
BTC.Disable("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
|
|
}
|
|
|
|
Decorator(Repeat) {
|
|
Composite(Sequence) {
|
|
// Fail
|
|
//BTC.GetKeyDown("Space")
|
|
BTC.ListenToEvent("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto")
|
|
BTC.Wait(1)
|
|
BTC.CompareBool("RisottoIsSnapped", false)
|
|
|
|
// Objekt geht zurueck
|
|
BTC.SetPosition("GO/NamedGrabEvent/NamedOutline.INTERACTABLES.Risotto", -6.824, 1.335, -18.8996)
|
|
|
|
BTC.SynthesizeText("Das hast du an den falschen Ort gestellt.")
|
|
BTC.SpeechOutputEnded()
|
|
}
|
|
}
|
|
}
|
|
} // 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")
|
|
}
|
|
|
|
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", -6.607, 1.321, -18.8996)
|
|
|
|
BTC.SynthesizeText("Das hast du an den falschen Ort gestellt.")
|
|
BTC.SpeechOutputEnded()
|
|
}
|
|
}
|
|
}
|
|
} // 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")
|
|
}
|
|
|
|
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", -6.686, 1.321, -18.8996)
|
|
|
|
BTC.SynthesizeText("Das hast du an den falschen Ort gestellt.")
|
|
BTC.SpeechOutputEnded()
|
|
}
|
|
}
|
|
}
|
|
} // 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")
|
|
}
|
|
|
|
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", -6.58, 1.451, -19.0233)
|
|
|
|
BTC.SynthesizeText("Das hast du an den falschen Ort gestellt.")
|
|
BTC.SpeechOutputEnded()
|
|
}
|
|
}
|
|
}
|
|
} // 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")
|
|
}
|
|
|
|
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", -6.947, 1.402, -18.995)
|
|
|
|
BTC.SynthesizeText("Das hast du an den falschen Ort gestellt.")
|
|
BTC.SpeechOutputEnded()
|
|
}
|
|
}
|
|
}
|
|
} // 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")
|
|
}
|
|
|
|
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", -6.752, 1.449, -19.024)
|
|
|
|
BTC.SynthesizeText("Das hast du an den falschen Ort gestellt.")
|
|
BTC.SpeechOutputEnded()
|
|
}
|
|
}
|
|
}
|
|
} // Sequence
|
|
}
|
|
|
|
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.")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
// Oel in Topf geben - ToDo: Particle Trigger
|
|
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Olivenoel")
|
|
BTC.Run("Collider.INTERACTABLES.Topf")
|
|
BTC.Run("AudioSource.AUDIO.Kueche2Fallesgefun")
|
|
|
|
// 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", "Zwiebeln")
|
|
BTC.Run("Collider.INTERACTABLES.Topf")
|
|
BTC.Run("StudioEventEmitter.INTERACTABLES.ZwiebelnInTopf")
|
|
|
|
BTC.Run("AudioSource.AUDIO.Kueche3Fallesgefun")
|
|
|
|
// 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.Set("TextMeshPro.GO.Option1Button", "text", "Ja")
|
|
BTC.Show("GO.GO.Option1Button")
|
|
BTC.Set("TextMeshPro.GO.Option2Button", "text", "Nein")
|
|
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")
|
|
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")
|
|
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.GO.Option1Button", "text", "Ja")
|
|
BTC.Show("GO.GO.Option1Button")
|
|
BTC.Set("TextMeshPro.GO.Option2Button", "text", "Nein")
|
|
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")
|
|
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")
|
|
RunTree("32_Grotto_Kueche_Zusammen_Kochen")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Tree("32_Grotto_Kueche_Interesse_Kochen") {
|
|
// --- Kueche - Interesse Kochen ---
|
|
Composite(Sequence) {
|
|
BTC.Run("AudioSource.AUDIO.Kueche1FInteresseK")
|
|
// ToDo: Freie Antwort als Speech Input
|
|
BTC.Set("TextMeshPro.GO.Option1Button", "text", "Lasagne")
|
|
BTC.Show("GO.GO.Option1Button")
|
|
BTC.SetBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked", false)
|
|
|
|
Composite(Race) {
|
|
Composite(Sequence) {
|
|
// Lieblingsessen nennen
|
|
BTC.Run("NamedEventTrigger.GO.Option1Button")
|
|
BTC.SetBool("32_Grotto_Kueche_Interesse_Kochen_Button_Clicked")
|
|
BTC.Hide("GO.GO.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.GO.Option1Button")
|
|
BTC.Hide("GO.GO.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")
|
|
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")
|
|
}
|
|
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.GO.Option1Button", "text", "sehr oft")
|
|
BTC.Show("GO.GO.Option1Button")
|
|
BTC.Set("TextMeshPro.GO.Option2Button", "text", "selten")
|
|
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")
|
|
RunTree("32_Grotto_Kueche_Selbststaendig_Kochen")
|
|
}
|
|
Composite(Sequence) {
|
|
// selten
|
|
BTC.Run("NamedEventTrigger.GO.Option2Button")
|
|
BTC.AbortEventListener("NamedEventTrigger.GO.Option1Button")
|
|
BTC.Hide("GO.GO.Option1Button")
|
|
BTC.Hide("GO.GO.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.Set("Collider.INTERACTABLES.Topf", "otherTag", "Risotto")
|
|
BTC.Run("Collider.INTERACTABLES.Topf")
|
|
|
|
// Ruehren
|
|
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Loeffel")
|
|
BTC.Run("Collider.INTERACTABLES.Topf")
|
|
BTC.Wait(2) // Wie lange ruehren?
|
|
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 - Todo: Particle Trigger
|
|
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Weisswein")
|
|
BTC.Run("Collider.INTERACTABLES.Topf")
|
|
BTC.StopSound("StudioEventEmitter.INTERACTABLES.ZwiebelnInTopf")
|
|
BTC.Run("StudioEventEmitter.INTERACTABLES.Abloeschen")
|
|
|
|
Composite(Marathon) {
|
|
Composite(Sequence) {
|
|
BTC.Wait(6)
|
|
BTC.SetFloat("StudioEventEmitter.INTERACTABLES.Abloeschen", "blubbern.transition", 1)
|
|
BTC.Show("GO.INTERACTABLES.ChangeSound") // Ruehren
|
|
}
|
|
|
|
Composite(Sequence) {
|
|
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 - Todo: Particle Trigger
|
|
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Bouillon")
|
|
BTC.Run("Collider.INTERACTABLES.Topf")
|
|
BTC.Run("AudioSource.AUDIO.Kueche4FZusammenKo")
|
|
|
|
// Glas Wasser mit Steinpilze in Topf geben
|
|
BTC.Set("Collider.INTERACTABLES.Topf", "otherTag", "Steinpilze")
|
|
BTC.Run("Collider.INTERACTABLES.Topf")
|
|
|
|
//RunTree("32_Grotto_Kueche_Parmigiano")
|
|
RunTree("32_Grotto_Im_Grotto_Essen_Intro")
|
|
}
|
|
}
|
|
|
|
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.")
|
|
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?")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
// Antwort User
|
|
// ToDo: Sprache fehlt
|
|
BTC.Set("TextMeshPro.GO.Option1Button", "text", "Ja")
|
|
BTC.Show("GO.GO.Option1Button")
|
|
Composite(Race) {
|
|
BTC.Run("NamedEventTrigger.GO.Option1Button")
|
|
BTC.Wait(5)
|
|
}
|
|
BTC.Hide("GO.GO.Option1Button")
|
|
|
|
BTC.SynthesizeText("Bitte stelle den Risotto hier hin.")
|
|
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?")
|
|
BTC.SpeechOutputEnded()
|
|
|
|
// 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()
|
|
|
|
// Fallback Button
|
|
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")
|
|
}
|
|
}
|
|
}
|
|
|
|
// -- 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_Im_Grotto_Essen_Intro") {
|
|
// --- 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")
|
|
|
|
}
|
|
}
|
|
|
|
Tree("32_Grotto_Kueche_Hide") {
|
|
Composite(Sequence) {
|
|
// Go to scene 3.5 Slideshow
|
|
BTC.GetKeyDown("Return")
|
|
BTC.SetStoryBVisited()
|
|
BTC.Run("LoadScene.NEXT.35Slideshow")
|
|
}
|
|
}
|
|
|
|
|