Jump to content

Need help: Scripting/Dialogue question....


Guest Messenjah

Recommended Posts

Guest Messenjah

Ok, so I have set up a quest. Six different NPC's must call upon several shorts that are tied to a single quest. The quest can be started by talking to any of six different NPCs.

 

The problem, is that I do NOT want them all to activate at the same time due to several issues that will occur.

 

 

What I need to know, is if I create my quest script with a begin OnActivate, will it activate, via dialogue by setting variables in said dialogue? Or will it just change the variable and do nothing?

 

IE:

 

 

SCN NPCQuestSCRIPT

 

short NPC1

short NPC2

short NPC3

short NPC4

 

begin OnActivate

 

if NPC1==1

set NPC2 to 0

set NPC3 to 0

set NPC4 t0 0

elseif NPC2=1

set NPC1 to 0

set NPC3 to 0

set NPC4 to 0

elseif NPC3=1

set NPC1 to 0

set NPC2 to 0

set NPC4 to 0

elseif NPC4=1

set NPC1 to 0

set NPC2 to 0

set NPC3 to 0

endif

End

 

 

Will this work if, within the dialogue, I set a result script of, for example;

set NPCQuest.NPC to 1

 

Will it then activate the quest script and run the check? I don't want to run a GameMode script globally to check it. Just want to check it once.

Link to comment
Share on other sites

I'm not sure I follow what you want do, but would setting all those within the dialogue work?

 

Example:

 

Result script within NPC1 dialogue:

set NPCQuest.NPC1 to 1

set NPCQuest.NPC2 to 0

set NPCQuest.NPC3 to 0

set NPCQuest.NPC4 to 0

 

Result script within NPC2 dialogue:

set NPCQuest.NPC1 to 0

set NPCQuest.NPC2 to 1

set NPCQuest.NPC3 to 0

set NPCQuest.NPC4 to 0

 

And so on. I don't know if it would fit within the context of your overall design, but it might be simpler to have one variable, say NPCQuest.NPC, and set it to 1, 2, 3, or 4 depending on which NPC and then do whatever work you need done against that.

Edited by viennacalling
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...