Conversations Dateien können im Action API: Block Syntax oder im Action API: Flow Syntax erstellt werden. Flow ist dabei die empfohlene Methode da so deutlich schneller Conversations erstellt werden können. Jede Conversations Datei muss mit
Eine Conversation ist dabei in Stages unterteilt und benötigt immer eine
Alles anzeigen
Alles anzeigen
.conv.yml
enden.Eine Conversation ist dabei in Stages unterteilt und benötigt immer eine
start
Stage da sonst die Conversation ungültig ist. Jede Stage kann dabei eine Vielzahl an Actions und Answers beinhalten. Eine Answer ist eine Antwort Möglichkeit des Spielers die dann wiederrum verschiedene Actions aufruft um z.B. die Stage zu wechseln.Quellcode: flow-conversation.conv.yml
- stages:
- start:
- auto-show-answers: false
- actions:
- flow:
- - '!text "Willkommen %name! Wie geht es dir?"'
- - ~2s
- - '!text.player "Danke, mir geht es gut."'
- - ~2s
- - '!text "Was haltet ihr davon den Spawn in die Luft zu sprengen?"'
- - ~1s
- - '!answers.show'
- answers:
- flow:
- - ':"Ja! So groß wie möglich!!!"'
- - '!detonate 10,65,-22,world, size:huge, damage-blocks:true'
- - ':"Naja ich weis nicht, aber bitte ohne Block Schaden!"'
- - '!detonate 10,65,-22,world, damage-blocks:false'
- - ':"Ne lass mal stecken, die armen Blöcke :/"'
- - '!text "Feigling..."'
- - ':"Sonst hast du nichts drauf?!"'
- - ~1s
- - '!stage more-fun'
- more-fun:
- text: "Oh doch... An was denkst du?"
- answers:
- flow:
- - ':"Ich möchte zum Mond fliegen."'
- - '!player.rocket force:1000'
Quellcode: block-example.conv.yml
- stages:
- start:
- auto-show-answers: false
- actions:
- 1:
- type: text
- args:
- text: "Willkommen %name! Wie geht es dir?"
- 2:
- type: text.player
- delay: 2s
- args:
- text: "Danke, mir geht es gut."
- 3:
- type: text
- delay: 4s
- args:
- text: "Was haltet ihr davon den Spawn in die Luft zu sprengen?"
- 4:
- type: answers.show
- delay: 5s
- answers:
- 1:
- text: "Ja! So groß wie möglich!!!"
- actions:
- 1:
- type: detonate
- args:
- x: 10
- y: 65
- z: -22
- world: world
- size: huge
- damage-blocks: true
- 2:
- text: "Naja ich weis nicht, aber bitte ihne Block Schaden!"
- actions:
- 1:
- type: detonate
- args:
- x: 10
- y: 65
- z: -22
- world: world
- damage-blocks: false
- 3:
- text: "Ne lass mal stecken, die armen Blöcke :/"
- actions:
- 1:
- type: text
- args:
- text: "Feigling..."
- 4:
- text: "Sonst hast du nichts drauf?!"
- actions:
- 1:
- type: stage
- delay: 1s
- args:
- stage: more-fun
- more-fun:
- text: "Oh doch... An was denkst du?"
- answers:
- 1:
- text: "Ich möchte zum Mond fliegen."
- actions:
- 1:
- type: player.rocket
- args:
- force: 1000
47.616 mal gelesen