Race Check

Moderator: Event DM

Post Reply
User avatar
Sili
Sage
Posts: 1816
Joined: Thu Oct 24, 2002 6:24 pm
Location: dallas, tx, GMT -5/-6?!!!
Contact:

Race Check

Post by 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
Aloro
Team Member; Retired with Honors
Posts: 12805
Joined: Sat Dec 28, 2002 5:11 am
Location: Rainbow's End
Contact:

Re: Race Check

Post by 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.
Post Reply