Page 1 of 1
Conversation restrictions
Posted: Sat Aug 06, 2005 8:56 pm
by Final Shinryuu
I'm trying to make a conversation option only appear for characters of fifth level or under.
Here is what I managed to come up with, and attach in the conversation editor.
Code: Select all
int StartingConditional()
{
if(GetHitDice(GetPCSpeaker()) < 6)
return FALSE;
return TRUE;
}
And as you can see, I have very little idea of what I am doing.
Could someone point out what I need to do to make this work?
Re: Conversation restrictions
Posted: Sat Aug 06, 2005 9:02 pm
by Grunt
Final Shinryuu wrote:I'm trying to make a conversation option only appear for characters of fifth level or under.
Here is what I managed to come up with, and attach in the conversation editor.
Code: Select all
int StartingConditional()
{
if(GetHitDice(GetPCSpeaker()) < 6)
return FALSE;
return TRUE;
}
And as you can see, I have very little idea of what I am doing.
Could someone point out what I need to do to make this work?
...can you use an ELSE statement in there?
it looks like it is saying
if HD < 6 return false.
Now return true.
...you need something to say if hd <6 choose false, Else return true... I think?
Posted: Sat Aug 06, 2005 9:07 pm
by Final Shinryuu
Hehe, maybe. I don't quite understand it myself, so I'm hoping that someone around here knows how to do this right and can just write up a fixed version of it for me.

Posted: Sat Aug 06, 2005 9:48 pm
by Final Shinryuu
I've got it working, thanks!
Posted: Sat Aug 06, 2005 11:41 pm
by xarthna
*facepalms*
once a function has encountered a Return statement, control is "returned" back to the calling function. No further statements in that function will be executed.
At least that is how the several computer languages I know operate.
I'd hope that NWN scripting would not make up different rules.