View Full Version : [k1] what is a script so a npc.....

07-03-2008, 12:25 PM
i need a script so that a npc says somthing only if you have a certain party member with you (in my case canderous)

07-03-2008, 12:26 PM
There are pre-made scripts to conditionally check if a party member is currently with you. Someone with current access to KotOR Tool can tell you what they are named.

07-03-2008, 01:08 PM
well does anyone have the script?

07-03-2008, 01:29 PM
I'm not 100 % sure but I think k_con_candernpm is the right name of the script.

07-03-2008, 05:31 PM
nope that script dosnt work anyone know the right one?

Marius Fett
07-03-2008, 05:33 PM
k_con_canderpm :)

07-03-2008, 05:37 PM
ok ill try it (at this point ill try anything)
do i need to make a script file or just put the code in???

IT DIDNT WORK =( anyone else know what one it is?

07-03-2008, 10:12 PM
No...you just write "k_con_canderpm" in the conditional script box for the dialog node. Take a picture of the dialog node in question and post it here.

07-03-2008, 11:01 PM
ok this is my dialog there might be a simple bug thats happening

07-03-2008, 11:59 PM
Where you input k_canderpm, change it so it reads exactly k_con_canderpm. Otherwise it won't work. Everything else looks fine.

07-04-2008, 12:05 AM
o ok i didnt see the error

07-04-2008, 01:28 AM
o ok i didnt see the error

...Yeah, it's quite exact about the filename. So even an extra space will cause it to not work correctly (and believe me, finding a space is a hassle) :)


07-04-2008, 02:59 AM
On a side note, "Firends" is spelt: Friends :)

Good luck with your mod ;)

07-04-2008, 11:37 AM
On a side note, "Firends" is spelt: Friends :)

Spelt? :xp:

In that case, you've also misspelled 'since,' 'ultimate,' 'that's,' 'retrieve,' and 'helmet,' and you didn't capitalize 'Mandalore,' 'Mandalorians,' 'Do,' 'Really,' 'I,' and 'Well.'

Make sure you have someone else go through your dialog before you release it to spellcheck it. FWIW, I think that correct dialog is one of the most important parts of a mod.


07-04-2008, 12:07 PM
Spelt? :xp:
Woz on perps :xp:

07-04-2008, 12:12 PM
its still not working right is it because most of the dialog is said by canderous and jax to each other?

07-04-2008, 01:34 PM
Woz on perps :xp:

Yeah, I thought you did :D

its still not working right is it because most of the dialog is said by canderous and jax to each other?

I think it's because you have it structured so that the dialog is all said by Jax. It seems that you have it set up so that it's a one sided-convo.

Can you tell us how the problem is presenting itself? Is the problem that only Jax is talking?


07-05-2008, 12:14 PM
Personally in these situations I like to debug things.
//:: k_con_canderpm
checks to see if canderous is a party member
//:: Created By:
//:: Copyright (c) 2002 Bioware Corp.
//:: modified by Aidan, Sept 28,02
//:: updated with the new party functions
#include "k_inc_debug"

int StartingConditional()
return ((IsNPCPartyMember(NPC_CANDEROUS) == TRUE) && (GetDistanceBetween(GetPCSpeaker(), GetObjectByTag("cand")) <= 10.0));

If we look at what the script actually checks for then we can make sure the conditions are exact. Basically it gets if Canderous is a party member and is within 10 meters of the "GetPCSpeaker()" which I am assuming is the player character.

Bit of a silly question but, is Canderous in your party and within 10 meters when you talk? And since I am assuming the answer is yes I think you should recompile the script with this line attached to the start of the script:
SendMessageToPC(GetFirstPC(), "DEBUG: k_con_canderpm executed")

Then run your dialog again and check your FeedBack log for the line starting with "DEBUG". If its not there then the script didn't execute.