如何设置我的顶点技巧,以便用户必须对规则列表中的每个项目说下一步

时间:2019-10-01 19:41:57

标签: node.js alexa

我正在尝试创建一个在游戏开始时列出规则的游戏,因此,每当用户说下一步时,它就会转到下一条规则。或者,当用户说回到开始时,它重新定义了规则。

var Rule1 = "Our first rule is to stick together. If you are playing this gammme alone it will not work. to hear hte next rule say next. Or you can say start the game to start the game";

var Rule2 = "";

if(HearRules === "rules") {
    this.responce.speak(Rule1)
    .addElicitSlotDirective('next')
    .addElicitSlotDirective('Start')
    if(directCareStaffName === "josh" && residentName === "jason") {
      this.responce.speak(introductions);
    }
  'HearRUles': function (Rule1, Rule2) {
    if (this.attribute['currentStep'] == 1) {
      this.response
      .responseBuilder
      .speak('rule1');
    }
    if (this.attribute['currentStep'] == 2) {
      this.response
      .responseBuilder
      .speak('rule2');
    }
    if (this.attribute['currentStep'] == 3) {
      playSound('rule3');
    }


    }
  };

0 个答案:

没有答案