GetActorType
This article has been bylined by a contributor. Current rules do not allow bylines in mainspace articles, but articles written before August 2007 may have been bylined prior to the rules. If you are the original author, please comment on this in the Talk page.
If you are not the bylined author, please treat this article with respect. While this is a Wiki and this article is considered open for editing, courtesy is expected. If at all possible, please contact the bylined author about any changes you would like to make.
As always, see the Edit History to see who has contributed to the page, and use the Talk page if you have any questions regarding its content.
This isn't a function, but a work-around to get an actor's "type". Created by GBHis.
short GAT ; GetActorType set GAT to (GetIsCreature *8)+(getIsGhost)+(getVampire)+IsActor+(isEssential *4)-1
This returns the following values:
-1 - Not an actor 0 - NPC 1 - NPC Ghost 2 - NPC vampire 3 - NPC Ghost AND Vampire 4 - Essential NPC 5 - Essential NPC Ghost 6 - Essential NPC Vampire 7 - Essential NPC Ghost AND Vampire 8 - Creature 9 - Creature Ghost (creatures considered ghost by the game-engine). 10 - Creature Vampire 11 - Creature Ghost AND Vampire
Note that "Ghost" refers to creatures and NPCs who are affected by the SetGhost function. Ordinarily, a creature like a wraith will return 2 for "Creature", not "Creature Ghost."
You can make this a [Global Variable] to make it act as a function.