PDA

View Full Version : Need help with conditional scrip.


deathdisco
09-07-2005, 03:41 PM
I'm having trouble with dialog I'm working on(for KOTOR1).
I trying to make replies available by what level the PC is.
None of the replies are showing up even if the PC is above the level stated
in the script.

Here's the template I'm working off of:

#include "k_inc_debug"
int StartingConditional() {
if(GetCasterLevel(GetFirstPC()) > 9)
{
return TRUE;
}
else
{
return FALSE;
}
}


I'm not a scripter so I've been working by trail and error. Nothing I've tried
has worked so far. I've could of sworn it worked when I first tried it.

stoffe
09-07-2005, 04:06 PM
I'm having trouble with dialog I'm working on(for KOTOR1).
I trying to make replies available by what level the PC is.
None of the replies are showing up even if the PC is above the level stated
in the script.

Here's the template I'm working off of:
(snip)
if(GetCasterLevel(GetFirstPC()) > 9)
(snip)


Use GetHitDice() if you want the total character level, or GetLevelByClass() if you want what level the character has in a specific class.

Assuming total character level, your script would be:

int StartingConditional() {
return (GetHitDice(GetFirstPC()) > 9);
}

deathdisco
09-07-2005, 06:06 PM
Thanks, that did the trick.
I appreciate the help.