Alright, so it goes like this. I have a conversation where my PC talks to an NPC, and the first time he does, the NPC says something like "what brings you to my door?" If the PC says, "sorry, I have to go", then I want the conversation to begin the same way when the PC comes back. But if the PC says "I was wondering who you were," then the NPC explains who he is and the next time the PC comes back, the NPC says, "welcome back!". How do I make this work?
Thanks
Conversation help
Débuté par
salmonstorrs95
, déc. 14 2010 05:32
#1
Posté 14 décembre 2010 - 05:32
#2
Posté 14 décembre 2010 - 07:23
I would look at a basic tutorial on conversations. This is accomplished by setting either a local (temporary) or persistent/campaign (permanent) variable, and checking it in the conditional script of the top conversational line. It can be as simple as:
You would set such a variable in a script in the actions taken line, like so:
This is just a very basic primer. There are tutorials out there with much more depth - I suggest you check the NWN Lexicon:
Click Me
Funky
int StartingConditional() {
return (GetLocalInt(GetPCSpeaker(),"NAMEOFVARIABLEYOUPICK"));
}
That code, placed in the TextAppearsWhen box in the npcs starting line, will make the line appear only if the variable is set to a nonzero value. The conversation would then display the next lower NPC starting line instead, unless it too had a FALSE return on a conditional script, in which case it would go to the next lower NPC starting line, and so on down the line.You would set such a variable in a script in the actions taken line, like so:
void main() {
SetLocalInt(GetPCSpeaker(), "NAMEOFVARIABLEYOUPICK", 1);
}
This is just a very basic primer. There are tutorials out there with much more depth - I suggest you check the NWN Lexicon:
Click Me
Funky





Retour en haut






