Difference between revisions of "GetActorType"
formatting, fixing category links
imported>GBHis |
imported>Scruggs (formatting, fixing category links) |
||
Line 1: | Line 1: | ||
This isn't a function, but a work-around to get an actor's "type". | This isn't a function, but a work-around to get an actor's "type". Created by [[User:GBHis|GBHis]]. | ||
<pre> | <pre> | ||
short GetActorType | |||
set GetActorType to GetIsCreature+(getIsGhost *3)+(getVampire *4)+IsActor+(isEssential *9)</pre> | |||
This returns the following values: | |||
<pre> | <pre> | ||
0 - Not an Actor | 0 - Not an Actor | ||
Line 19: | Line 21: | ||
18 - Essential NPC Ghost AND Vampire</pre> | 18 - Essential NPC Ghost AND Vampire</pre> | ||
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." | |||
[Category:Solutions] | [[Category:Solutions]] | ||
[[Category:Useful_Code]] |