Not sure why this isnt working
Not sure why this isnt working
I have made a character who talks and gives reward and then when i talk to him again he is just meant to say Hello, nothing else. I have on the first greeting put Actions Taken: set local variables, Int-nFirstTimeTalked and set value to 1. On the next greeting i have scripted 'Text appears when when local variable nFirstTimeTalked is 1'.
This is what is said to do in the tutorial, and i used it before and it worked fine. What am i doing wrong?
This is what is said to do in the tutorial, and i used it before and it worked fine. What am i doing wrong?
'My pantaloons are full of weasels. Inform the Queen, so that she might shoo them away. Here we go 'round the mulberry bush. Go monkey GO!'-Wanev
Have you ever heard any more inspiring or logical words? I sure haven't.
Have you ever heard any more inspiring or logical words? I sure haven't.
The order in which NPC dialogue options appear is important. Consider the following example:
NPC: "Well done!" IF quest done
NPC: "Hurry up!" IF quest accepted
NPC: "I have a job for you."
Set up like this, it works. When the game tries to decide which option gets picked for the NPC, it starts at the top. It looks at each option in turn, running any script needed. As soon as an option is found that does not have a script that returns FALSE (so that's either a script that returns TRUE or no script at all), that option immediately gets picked and the remaining options are ignored.
NPC: "Well done!" IF quest done
NPC: "Hurry up!" IF quest accepted
NPC: "I have a job for you."
Set up like this, it works. When the game tries to decide which option gets picked for the NPC, it starts at the top. It looks at each option in turn, running any script needed. As soon as an option is found that does not have a script that returns FALSE (so that's either a script that returns TRUE or no script at all), that option immediately gets picked and the remaining options are ignored.
[url="http://www.sorcerers.net/Games/BG2/SpellsReference/Main.htm"]Baldur's Gate 2 Spells Reference[/url]: Strategy, tips, tricks, bugs, cheese and corrections to the manual.
Thanks!
I thought of that, because only after testing it did i realise it needed a second greeting so you couldnt get the key a billion times. Is there a way to insert the alternative greeting AFTER making the first one?
I thought of that, because only after testing it did i realise it needed a second greeting so you couldnt get the key a billion times. Is there a way to insert the alternative greeting AFTER making the first one?
'My pantaloons are full of weasels. Inform the Queen, so that she might shoo them away. Here we go 'round the mulberry bush. Go monkey GO!'-Wanev
Have you ever heard any more inspiring or logical words? I sure haven't.
Have you ever heard any more inspiring or logical words? I sure haven't.
If you drag and drop a node onto its parent, it becomes the lowest option. Just drag all nodes onto the parent in the order you want them to appear.
If I mistook your question, do say so.
If I mistook your question, do say so.
[url="http://www.sorcerers.net/Games/BG2/SpellsReference/Main.htm"]Baldur's Gate 2 Spells Reference[/url]: Strategy, tips, tricks, bugs, cheese and corrections to the manual.
Hi. This is my first post here. Anyway, I'm having the same problem in my mod. I have the initial greeting at the bottom of the dialog tree, and here's the weird thing: I've got 2 NPC's, so far the only 2 that I've written nFirstTimeTalked dialogs for, and whichever one I talk to 1st, gives the initial greeting, and the other goes straight to "hello again".
People are more violently opposed to fur than leather, because it's safer to pick on rich women than biker gangs.
What is the name of the quest, is it possible are both the same name? For instance if you named it "Story_1" did you then name both quests "Story_1"?Originally posted by Alisondre
I used the dreaded SCRIPT WIZARD, and highlighted the text that my npc was supposed to say, so it shouldn't be set on the module. As a matter of fact no, it isn't. I checked.![]()
BTW I am fairly inexperienced with scripting myself, so bear with me
I'd have to get drunk every night and talk about virility...And those Pink elephants I'd see.
No, I didn't attach any parts of the quest to those conversations. It's 2 shopkeepers, and I just want them to say, the first time the pc talks to them, a "Hail and well met" sort of thing, and a "Hello, again" sort of thing after that. Bioware has an introduction to the toolset tutorial with a conversation like that. It basically shows you how to set up local variables, based on nFirstTimeTalked, to make that happen. Now, there was only 1 conversation like that in the module, the others had dialog trees that were dependent on things like completion of quest stages, but I figured that what works for 1 would work for 2. What is happening, it seems, is that those 2 npc's are, to the script, being treated as 1 person, which makes no sense to me; I did write 2 seperate conversations. It's been a pain; such a simple problem, I mean, it's not like I'm trying to have all the female citizens of the town turn in to werewolves on alternate full moons but only if it's that time of the month, and have them serve you drinks in the meantime!
Matter of fact, it's so simple, that none of the webpages with posted scripts have anything even remotely applicable. AAAAAAAAA!!
People are more violently opposed to fur than leather, because it's safer to pick on rich women than biker gangs.
If you are using the same script on both NPC you have to put the LocalInt on OBJECT_SELF and not GetPCSpeaker() or GetModule(), if you put it on the PC they will indeed act as one NPC.
Use this line
SetLocalInt(OBJECT_SELF,"varname",1(or what ever));
To check just use the script wizard but make sure to change GetPCSpeaker() to OBJECT_SELF !!
If I remember correctly it should look something like this
iResult=TRUE;
if (!(GetLocalInt(OBJECT_SELF,"varname"))==0)
iResult=FALSE;
return iResult
not sure about the syntax I never ran it but it look like it might work. You ofcourse have to put starting conditional in there as well
Use this line
SetLocalInt(OBJECT_SELF,"varname",1(or what ever));
To check just use the script wizard but make sure to change GetPCSpeaker() to OBJECT_SELF !!
If I remember correctly it should look something like this
iResult=TRUE;
if (!(GetLocalInt(OBJECT_SELF,"varname"))==0)
iResult=FALSE;
return iResult
not sure about the syntax I never ran it but it look like it might work. You ofcourse have to put starting conditional in there as well
"Those who control the past control the future, those who control the present control the past" And I rule the PRESENT!!
I put the 'laughter' back in 'slaughter'
I put the 'laughter' back in 'slaughter'