Determines the age of a creature.
Creature to get the age from.
Returns oCreature's age and 0 if oCreature is invalid.
This can be used as a clever way to determine if a creature is a PC since NPCs do not have ages. See the addition code sample below for more information.
Of course, GetIsPC is more useful! A PC can set their age to 0 if they wished!
Obviously, oCreature is invalid if it is anything other then a creature.
int TrustCreature(object oCreature)
if (GetAge(oCreature) >= 30)
return FALSE; // Over 30? Can't be trusted.
// clever way to determine if a creature is a PC
int NewIsPC(object oCreature)
if (GetAge(oCreature) != 0)
author: Tom Cassiotis, editor: Jasperre, additional contributor(s): George Mathis