Server Totals
M'Chek - (1)
Wilderness - (1)
Ferrell - (0)
Elysia - (0)
Le'Or - (0)
Deglos - (0)
Visimontium - (0)
Underdark - (0)
Mikona - (0)
Total players: 2
Gallery
  • newtreasure
    Album name: DM Events
    Uploaded by: Ronan
    Uploaded: Sat Jun 18, 2016 11:57 pm

Links Menu

Race Check

Moderators: Nighthawk4, Dungeon Masters

Race Check

PostAuthor: Sili » Wed Nov 05, 2003 11:18 pm

Is it possible for an NPC to do a race check within a conversation?

ex.

NPC- Hello.
PC- Can I ask a question?
NPC- Yes. (if the PC is dwarven)
conversation continues

else
NPC- No. (if the PC is not dwarven)
conversation ends

Sili
grunt_work: and lycans are just furries with an attack bonus
User avatar
Sili
Gold Contributor
 
Posts: 1816
Joined: Thu Oct 24, 2002 6:24 pm
Location: dallas, tx, GMT -5/-6?!!!

Re: Race Check

PostAuthor: Aloro » Wed Nov 05, 2003 11:26 pm

Sili wrote:Is it possible for an NPC to do a race check within a conversation?

ex.

NPC- Hello.
PC- Can I ask a question?
NPC- Yes. (if the PC is dwarven)
conversation continues

else
NPC- No. (if the PC is not dwarven)
conversation ends

Sili


Sure.

Oh, wait, you wanted more than just an answer, didn't you?

* sighs *

OK, what ya do is something like this (pseudocode written at the office):

Code: Select all
int StartingConditional()
{
    object oPC = GetPCSpeaker();
    int iRace = GetRacialType(oPC);
    if (iRace = RACIAL_TYPE_DWARF) return TRUE;
    else return FALSE;
}


Put that in the starting conditional, and whatever it's attached to will be spoken only to dwarves.

- Aloro
Aleksandr Solzhenitsyn wrote:The meaning of earthly existence lies, not as we have grown used to thinking, in prosperity, but in the development of the soul.
User avatar
Aloro
Team Member; Retired with Honors
 
Posts: 12810
Joined: Sat Dec 28, 2002 5:11 am
Location: Rainbow's End


Return to NWN Scripting

Who is online

Registered users: Antius, Bing [Bot], Google [Bot], slow feet