GetActorType

Revision as of 12:02, 25 October 2006 by imported>Scruggs (formatting, fixing category links)

This isn't a function, but a work-around to get an actor's "type". Created by GBHis.

short GetActorType
set GetActorType to GetIsCreature+(getIsGhost *3)+(getVampire *4)+IsActor+(isEssential *9)

This returns the following values:

0 - Not an Actor
1 - NPC
2 - Creature
3 - NPC Ghost
4 - Creature Ghost (creatures considered ghost by the game-engine).
5 - NPC vampire
6 - Creature Vampire
8 - NPC Ghost AND Vampire
9 - Creature Ghost AND Vampire
10 - Essential NPC
13 - Essential NPC Ghost
15 - Essential NPC Vampire
18 - Essential NPC 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."