GetRacialType(object)
Determines the race of a creature.
int GetRacialType( object oCreature );
Parameters
oCreature
The creature whose race we are interested in.
Description
Returns the racial type (RACIAL_TYPE_*) of oCreature and RACIAL_TYPE_INVALID If oCreature is invalid.
Version
1.61
Example
//Area transition script
//Dwarves go to "MORIA",
//Everybody else goes to the default transition
//(I know, stupid example, but still...)
void main()
{
object oPC=GetClickingObject();
object oTarget;
if (GetRacialType(oPC)==RACIAL_TYPE_DWARF) oTarget = GetObjectByTag("MORIA");
else oTarget = GetTransitionTarget(OBJECT_SELF);
AssignCommand(oPC, JumpToObject(oTarget));
}
See Also
| categories: | Get Data from Creature Functions |
| constants: | RACIAL_TYPE_* Constants |
author: Tom Cassiotis, editor: Lilac Soul
Send comments on this topic.