ついにゲームにクエストを追加することにしました。クエストはそれぞれ個別のものにしてほしいです。たぶん後で、そのクエストがアクセスされる前に別のクエストが完了しているもの。ともかく。
どうすればいいですか?私はそれについてたくさん考えました。私は PHP/Javascript/Mysqli 派です。
NPC に話しかけ、正しい「答え」を選択すると、クエストが開始されます。タスクを実行すると、他の NPC と話す必要がある場合があります。それはすべて依存します。会話を保存して表示するにはどうすればよいですか?
ありがとう。
編集
これが私が「やった」ことです。
var people = [];
people[1]=['name'=>'Joe'];
people[1]['questions'][1] = 'Why, hello there';
people[1]['questions'][1]['send'] = 1;
people[1]['questions'][2] = 'My name is Joe, You seem to be new around here';
people[1]['questions'][2]['send'] = 2;
people[1]['questions'][3] = 'Why certainly! How about I send you on a quest to help you. It will get you aquainted with Corgate';
people[1]['questions'][3]['send'] = makequest(1);
people[1]['answers'][1] = array('Hello, who are you?');
people[1]['answers'][1]['send'] = 2;
people[1]['answers'][2] = array("I'm not new! Good bye!",'Yes I am, Can you help me?');
people[1]['answers'][2]['send'][1] = 3;
people[1]['answers'][2]['send'][2] = endthis();
非常にずさんです。はい。基本的に、それは質問から始まります。次に、その ID を持つ回答に「送信」します。次に、選択された回答の配列に基づいて、それを対応する質問に送信します。