Difference between revisions of "GetActorType"

76 bytes added ,  20:04, 23 June 2012
Byline removed
imported>GBHis
imported>QQuix
(Byline removed)
 
(19 intermediate revisions by 8 users not shown)
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".  
 
<pre>
<pre>
getactortype = GetIsCreature+(getisghost *3)+(getvampire *4)+IsActor+(isessential *9)</pre>
short GAT ; GetActorType
 
set GAT to (GetIsCreature *8)+(getIsGhost)+(getVampire *2)+IsActor+(isEssential *4)-1</pre>
Here goes the values returned:
This returns the following values:
<pre>
<pre>
0 - Not an Actor
-1 - Not an actor
1 - NPC
0 - NPC
2 - Creature
1 - NPC Ghost
3 - NPC Ghost
2 - NPC vampire
4 - Creature Ghost (creatures considered ghost by the game-engine).
3 - NPC Ghost AND Vampire
5 - NPC vampire
4 - Essential NPC
6 - Creature Vampire
5 - Essential NPC Ghost
8 - NPC Ghost AND Vampire
6 - Essential NPC Vampire
9 - Creature Ghost AND Vampire
7 - Essential NPC Ghost AND Vampire
10 - Essential NPC
8 - Creature
13 - Essential NPC Ghost
9 - Creature Ghost (creatures considered ghost by the game-engine).
15 - Essential NPC Vampire
10 - Creature Vampire
18 - Essential NPC Ghost AND Vampire</pre>
11 - Creature Ghost AND Vampire
 
</pre>
I'm not fantastic at WIKI formatting, but I tried :)


Main article by --[[User:GBHis|GBHis]] 11:31, 25 October 2006 (EDT)
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."
Suggestions go below (or in the TALK page):




[Category:Solutions]
[[Category:Solutions]]
[[Category:Useful_Code]]
Anonymous user