PDA

View Full Version : dialog scripts?


Canderis
07-02-2008, 06:14 PM
well im making a mod and i need a dialog script that alows you to have certain dialog options to say if you have a certain item in your inventory

JediMaster76
07-02-2008, 06:26 PM
... I believe you need a conditional script. Something like so...

int StartingConditional()
{
object oPC = GetPCSpeaker();

if (GetItemPossessedBy(oPC, "insert_itemtag") == OBJECT_INVALID) return FALSE;

return TRUE;
}


This conditional script is placed in dialog and determines whether or not you have an item in your inventory. If you do not, then it checks the next available option. I believe that's what you want.

TriggerGod
07-02-2008, 06:28 PM
@JediMaster: Theres a simpler way to do it:

Alright. First, make the dialog. Thats what you need to do first. In the first dialog node (the one that you want to play when you have a certain item) and put in the conditional script area, put "c_hasitem" (without quotes) and in String Parameter put the tag of the item.

JediMaster76
07-02-2008, 06:36 PM
@TriggerGod: You can do that? That's cool, that will easily reduce the amount of scripting I've been doing.

Meh, whatever works works, I suppose. :P

TriggerGod
07-02-2008, 06:44 PM
@TriggerGod: You can do that? That's cool, that will easily reduce the amount of scripting I've been doing.

Meh, whatever works works, I suppose. :P

There are several scripts you can use in there. Too lazy to find them all, but its a lot of them. c_hasitem, the c_influence scripts, a_make_jedi...

Canderis
07-02-2008, 06:56 PM
does it work for k1?
and were is the string parameter?

TriggerGod
07-02-2008, 07:05 PM
K1? :(
I've seen pictures of the K1 side of the DLGEditor. There is no String Parameter. AFAIK, that won't work for K1. If it was for TSL, then it was. If anyone would like to clarify?

Canderis
07-02-2008, 08:03 PM
well does any 1 know a code?

Robespierre
07-02-2008, 09:56 PM
The code that JediMaster76 gave you should work.

Canderis
07-02-2008, 10:29 PM
were do i put it i am new to scripting so...

TriggerGod
07-02-2008, 10:36 PM
put the name of that script (recommended to change it to something like "c_hasitem_"insertitemtaghere"" without the quotes (around either) and put the tag of the item after hasitem) in the "script to fire" (or something to that effect)

Canderis
07-02-2008, 11:29 PM
and thats for k1 right?

TriggerGod
07-02-2008, 11:37 PM
http://img.photobucket.com/albums/v608/D333/dlgeditor.jpg

Canderis
07-03-2008, 12:06 AM
how would i link it so thet there are 2 options 1 for if they didnt have the item it and 2 if thay did?



ps sory trigger if my questions are bugging you =(

Edit: can anyone answer my question?

ps sory for double post the edit button wasnt working

TriggerGod
07-03-2008, 12:54 PM
how would i link it so thet there are 2 options 1 for if they didnt have the item it and 2 if thay did?



ps sory trigger if my questions are bugging you =(

Alright.
First, put the name of the script in the "Script that fires..." area that you want spoken when you have that item, and one for when you don't (Don't put in a script)
Now, if you want the next line your NPC speaks when he has another (different) item, then do the same thing. Otherwise, try the script c_ismale (I don't know if that works for K1...)/c_isfemale (or something to that effect)

Canderis
07-03-2008, 12:59 PM
ok ty trigger i think i got it now