Hello y'all, I'm trying to use the momentum of passion for the game (both stock and NH) to improve my dialog writing. I've gotten some dialogs to work, others don't work. I think I understand most of the code, but until now I've always started by buidling my code on top of a copied dialog-file, so you might notice that in the whole preambel of the file. But writing it from scratch hasn't really worked for me.
Long story short, can you tell me what's causing the error in this short dialog structure I've been playing around with tonight?
//nclude "DIALOGS\Ramon Cabrera_dialog.h"
void ProcessDialogEvent()
{
ref NPChar;
aref Link, NextDiag;
DeleteAttribute(&Dialog,"Links");
makeref(NPChar,CharacterRef);
makearef(Link, Dialog.Links);
makearef(NextDiag, NPChar.Dialog);
ref PChar;
PChar = GetMainCharacter();
switch(Dialog.CurrentNode)
{
// -----------------------------------Äèàëîã ïåðâûé - ïåðâàÿ âñòðå÷à
case "First time":
Dialog.defAni = "dialog_stay1";
Dialog.defCam = "1";
Dialog.defSnd = "dialogs\0\017";
Dialog.defLinkAni = "dialog_1";
Dialog.defLinkCam = "1";
Dialog.defLinkSnd = "dialogs\woman\024";
Dialog.ani = "dialog_stay2";
Dialog.cam = "1";
Dialog.snd = "voice\THDI\THDI001";
dialog.text = DLG_TEXT[0];
link.l1 = DLG_TEXT[1];
link.l1.go = "shore_meetn1";
SetQuestHeader("castaway");
AddQuestrecord("castaway", "1");
break;
case "shore_meetn1":
d.Text = DLG_TEXT[2];
Link.l1 = DLG_TEXT[3];
Link.l1.go = "shore_meetn2";
Link.l2 = DLG_TEXT[4];
Link.l2.go = "exit_leave_shore";
break;
case "shore_meetn2":
d.Text = DLG_TEXT[5];
Link.l1 = DLG_TEXT[6];
Link.l1.go = "shore_meetn3";
break;
case "shore_meetn3":
d.Text = DLG_TEXT[7];
Link.l1 = DLG_TEXT[8];
Link.l1.go = "shore_meetn4";
break;
case "shore_meetn4":
d.Text = DLG_TEXT[9];
Link.l1 = DLG_TEXT[10];
Link.l1.go = "shore_meetn5";
Link.l2 = DLG_TEXT[11];
Link.l2.go = "exit_leave_shore";
break;
case "shore_meetn5":
d.Text = DLG_TEXT[12];
Link.l1 = DLG_TEXT[13];
Link.l1.go = "shore_meetn6";
break;
case "shore_meetn6":
d.Text = DLG_TEXT[14];
Link.l1 = DLG_TEXT[15];
Link.l1.go = "exit";
AddQuestrecord("castaway", "3");
break;
case "exit_leave_shore":
DialogExit();
NextDiag.CurrentNode = NextDiag.TempNode;
AddQuestrecord("castaway", "2");
CloseQuestHeader("castaway");
break;
case "exit":
DialogExit();
NextDiag.CurrentNode = NextDiag.TempNode;
break;
}
}
Long story short, can you tell me what's causing the error in this short dialog structure I've been playing around with tonight?
//nclude "DIALOGS\Ramon Cabrera_dialog.h"
void ProcessDialogEvent()
{
ref NPChar;
aref Link, NextDiag;
DeleteAttribute(&Dialog,"Links");
makeref(NPChar,CharacterRef);
makearef(Link, Dialog.Links);
makearef(NextDiag, NPChar.Dialog);
ref PChar;
PChar = GetMainCharacter();
switch(Dialog.CurrentNode)
{
// -----------------------------------Äèàëîã ïåðâûé - ïåðâàÿ âñòðå÷à
case "First time":
Dialog.defAni = "dialog_stay1";
Dialog.defCam = "1";
Dialog.defSnd = "dialogs\0\017";
Dialog.defLinkAni = "dialog_1";
Dialog.defLinkCam = "1";
Dialog.defLinkSnd = "dialogs\woman\024";
Dialog.ani = "dialog_stay2";
Dialog.cam = "1";
Dialog.snd = "voice\THDI\THDI001";
dialog.text = DLG_TEXT[0];
link.l1 = DLG_TEXT[1];
link.l1.go = "shore_meetn1";
SetQuestHeader("castaway");
AddQuestrecord("castaway", "1");
break;
case "shore_meetn1":
d.Text = DLG_TEXT[2];
Link.l1 = DLG_TEXT[3];
Link.l1.go = "shore_meetn2";
Link.l2 = DLG_TEXT[4];
Link.l2.go = "exit_leave_shore";
break;
case "shore_meetn2":
d.Text = DLG_TEXT[5];
Link.l1 = DLG_TEXT[6];
Link.l1.go = "shore_meetn3";
break;
case "shore_meetn3":
d.Text = DLG_TEXT[7];
Link.l1 = DLG_TEXT[8];
Link.l1.go = "shore_meetn4";
break;
case "shore_meetn4":
d.Text = DLG_TEXT[9];
Link.l1 = DLG_TEXT[10];
Link.l1.go = "shore_meetn5";
Link.l2 = DLG_TEXT[11];
Link.l2.go = "exit_leave_shore";
break;
case "shore_meetn5":
d.Text = DLG_TEXT[12];
Link.l1 = DLG_TEXT[13];
Link.l1.go = "shore_meetn6";
break;
case "shore_meetn6":
d.Text = DLG_TEXT[14];
Link.l1 = DLG_TEXT[15];
Link.l1.go = "exit";
AddQuestrecord("castaway", "3");
break;
case "exit_leave_shore":
DialogExit();
NextDiag.CurrentNode = NextDiag.TempNode;
AddQuestrecord("castaway", "2");
CloseQuestHeader("castaway");
break;
case "exit":
DialogExit();
NextDiag.CurrentNode = NextDiag.TempNode;
break;
}
}