Aller au contenu

Photo

Help needed with quest nd conversation script


  • Veuillez vous connecter pour répondre
7 réponses à ce sujet

#1
BrynHexx

BrynHexx
  • Members
  • 4 messages
Ok here is the situation. Dwarf NPC gives the PC a quest to find her missing husband. (thats the easy bit). But how do I get her to say something like "Have you found him yet?", instead of repeating the same conversation? I don't know how to use the StartingConditional function. I have played around with it, but no dice. Im guessing its got something to do with the StartingConditional though. Any help would be appreciated alot!

#2
Krevett

Krevett
  • Members
  • 104 messages
In the ActonTaken tab put this kind of script when the quest is taken



void main()

{

string sTag = GetTag(OBJECT_SELF);

SetLocalInt(GetPCSpeaker(), sTag, 1);

}



In the StartingConditional of the next node of your conversation put this one:



int StartingConditional()

{

string sTag = GetTag(OBJECT_SELF);

if (GetLocalInt(GetPCSpeaker(), sTag) == 1)

return TRUE;

return FALSE;

}



Note that the node with the conditional should be set before the node where the quest is taken in the conversation. Also note that these scripts are generic and can be reused with another npc (as long as their tags are different!)

Good luck!

#3
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
Here is a tutorial on the Lexicon that might help you understand better how to set up the conversation for something like what you want.

www.nwnlexicon.com/compiled/tutorial.asimplequest.html

#4
BrynHexx

BrynHexx
  • Members
  • 4 messages
Thank you both very much. I Shall try it imediatley.

#5
zero-feeling

zero-feeling
  • Members
  • 144 messages
easier way... look up pqj on the vault... knats journal system... think lightfoot has it as well as an editor he made for me in his projects too. easiest journal system for persistant worlds in my opinion.



zero



added the file to my projects as well.

#6
BrynHexx

BrynHexx
  • Members
  • 4 messages
Ah i got it fixed with the SetLocalInt, thanks for the help those folks. But now I have a very big problm. I (against my better judgment) allowed my friends son to have a go at scripting, but I got a lovley suprise when I found out he has over written nw_c2_default4. I waas wondering where I can get the CEP script. I really don't want to re-instal as I have both up to date CEP and PRC haks. I would absolutley hate to redo all that just for a script.so if anybody knows or cold post the CEP 2.3 version, I would be gratley in your debt.

#7
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
It never really gets overwritten. When you alter one of the default scripts it creates a new script in your list with the same name and acts as an override script but the default still exists in your module. If you don't like what he did to the default then just delete the one he altered from your list and the real default script will take over again.

Hope that makes sense.

#8
BrynHexx

BrynHexx
  • Members
  • 4 messages
FANTASTIC, you da man! Yep, It worked out all good. Thank you. I panicked for a while there. I really appreciate the help Thanx GhostOfGod