PDA

View Full Version : Dialogue Script Help


Istorian
07-01-2008, 04:10 AM
Hello, guys.

I am working on my first mod, but I have encountered some difficulties. The last thing I need to do before releasing the mod is a script that will be placed as a conditional and if the player has talked to the NPC again, it will start the NPC's convo with a new entry.

For example:

1)PC talks to NPC first time: Hello, stranger. Can I be of any assistance?

2)PC talks to NPC second, third time: Hello, again. What do you want?

I have created both entries, but I just need the script that will do what I explained before. Please some help people!!:xp:

zbyl2
07-01-2008, 04:22 AM
I you can use local number. In line "hello stranger...", put script:
void main()
{
SetLocalNumber(OBJECT_SELF, 13, 5);
}
and in second line ('hello again...'), as conditional try make something like that:
int StartingConditional()
{
return (GetLocalNumber(OBJECT_SELF, 13)==5);
}

Edit: and remember: line 'hello again...' must be first in DLG editor (click on this line and use move up function).

stoffe
07-01-2008, 07:35 AM
I am working on my first mod, but I have encountered some difficulties. The last thing I need to do before releasing the mod is a script that will be placed as a conditional and if the player has talked to the NPC again, it will start the NPC's convo with a new entry.


Which game is this for? There are standard scripts in both games that can be used for this, so you won't have to create your own.

If it's for KOTOR1, put k_con_talkedto as conditional script name and k_act_talktrue as action script name on the dialog entry node that should only be available the first time the player talks to the NPC.

If it's for TSL, put c_talkedto as conditional script name and a_talktrue as action script name on the dialog entry node that should only be available the first time the player talks to the NPC.

Istorian
07-03-2008, 05:29 AM
This is for TSL. Many thanks to both of you!! They both work!!:D

I hope I will finish the mod quickly!!

Darth_Andrez
10-02-2008, 09:03 AM
You should never try to finish a mod quickly, For it could lead to the mod having lot's of bugs and even though the public will anticapate any new dialog or added content very highly....They will like your mod a lot more in the long run if it does not have many problems

anyway's goodluck and hope your mod goes well