NPC dialogue script question

V12shear

First time out of the vault
I'm still pretty new to scripting in fallout, but I need help understanding why my dialogue is not working as intended.

I am trying to have certain dialogue appear the second time I interact with a npc. For example, when I first enter map I want the dialogue to be introductory dialogue, then if I interact with the same npc again, I want separate dialogue for the rest of the game.

I was able to accomplish this but only partially. If I start up the map and talk with the npc, it displays the introductory dialogue. If I try to talk with him again right after, it just repeats the introductory dialogue. Only when I leave the map and re-enter does the npc say the other dialogue.

Start Game > New Game > Enters Map > Interacts with NPC > Intro dialogue > Interacts with NPC again > Intro dialogue > Leave map > Re-enter map > new dialogue.

I'll attach my script and script.lst. I have a feeling it is something with my LVAR's or something. It is like my LVAR's get updated but do not apply to my script until I re-enter the map.
 

Attachments

You are using 9 LVARs
Code:
#define LVAR_Talked_Before              (9)
but you have only 7 allowed in the scripts.lst file
Code:
docwake.int     ; First Words To You When You Wake Up           # local_vars=7

Set local_vars=9 or 10, else the game won't be able to handle your LVAR_Talked_Before, LVAR_Talked_Before, etc.

On a different note, you can shorten your dialog procedures to
Code:
   start_gdialog(NAME,self_obj,4,-1,-1);
   gSay_Start;
   if (local_var(LVAR_Prepared) == 1) then begin
      call Node004;
   end
   else begin
      call Node001;
   end
   gSay_End;
   end_dialogue;
or use macros and do
Code:
   if (local_var(LVAR_Prepared) == 1) then begin
      start_dialog_at_node(Node004);
   end
   else begin
      start_dialog_at_node(Node001);
   end
 
You are using 9 LVARs
Code:
#define LVAR_Talked_Before              (9)
but you have only 7 allowed in the scripts.lst file
Code:
docwake.int     ; First Words To You When You Wake Up           # local_vars=7

Set local_vars=9 or 10, else the game won't be able to handle your LVAR_Talked_Before, LVAR_Talked_Before, etc.

On a different note, you can shorten your dialog procedures to
Code:
   start_gdialog(NAME,self_obj,4,-1,-1);
   gSay_Start;
   if (local_var(LVAR_Prepared) == 1) then begin
      call Node004;
   end
   else begin
      call Node001;
   end
   gSay_End;
   end_dialogue;
or use macros and do
Code:
   if (local_var(LVAR_Prepared) == 1) then begin
      start_dialog_at_node(Node004);
   end
   else begin
      start_dialog_at_node(Node001);
   end
Thanks, that was the issue. Before I saw this I ended up opening debug mode and got an LVAR error and just set the LVARS = 13 and it ended up working. I was getting confused and didn't realize it was the number next to the defined LVAR and not the amount in the script itself.
 
Back
Top