Server Totals
Underdark - (1)
Le'Or - (1)
M'Chek - (1)
Visimontium - (0)
Elysia - (0)
Ferrell - (0)
Wilderness - (0)
Mikona - (0)
Deglos - (0)
Total players: 3
Gallery
  • Golem Giants
    Album name: DM Events
    Uploaded by: Ronan
    Uploaded: Wed Aug 20, 2014 12:07 am

Links Menu

Conversation restrictions

Moderators: Nighthawk4, Dungeon Masters

Conversation restrictions

PostAuthor: Final Shinryuu » Sat Aug 06, 2005 8:56 pm

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?
User avatar
Final Shinryuu
Sage
 
Posts: 2060
Joined: Thu Jun 24, 2004 3:20 am
Location: http://hades.mercuric.net/

Re: Conversation restrictions

PostAuthor: Grunt » Sat Aug 06, 2005 9:02 pm

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?
FletcherWiki

*Stepping out of a portal*
Nawen Amakiir: there he is.. *smirks* someone had to make an entrance
Fletcher Millstone: MILLSTONE! *arms held high*
Lilliana Be'letane: You're the worst, Fletcher.
User avatar
Grunt
CCC
CCC
 
Posts: 9422
Images: 3
Joined: Sat Jun 05, 2004 12:37 am
Location: Boston, MA
Timezone: I AM A TIME LORD

PostAuthor: Final Shinryuu » Sat Aug 06, 2005 9:07 pm

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. :)
User avatar
Final Shinryuu
Sage
 
Posts: 2060
Joined: Thu Jun 24, 2004 3:20 am
Location: http://hades.mercuric.net/

PostAuthor: Final Shinryuu » Sat Aug 06, 2005 9:48 pm

I've got it working, thanks!
User avatar
Final Shinryuu
Sage
 
Posts: 2060
Joined: Thu Jun 24, 2004 3:20 am
Location: http://hades.mercuric.net/

PostAuthor: xarthna » Sat Aug 06, 2005 11:41 pm

*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.
User avatar
xarthna
Web B00bja, Princess
Web B00bja, Princess
 
Posts: 3213
Joined: Thu Jan 20, 2005 5:55 pm
Location: OH GMT-5 (-4:DST)


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Google [Bot]