GetAppearanceType(object)

Retrieves the appearance of a specified creature.

int GetAppearanceType(
    object oCreature
);

Parameters

oCreature

Creature to return the APPEARANCE_TYPE_* value of.


Description

Returns the APPEARANCE_TYPE_* value of a specified creature; returns APPEARANCE_TYPE_INVALID for non-creatures or invalid creatures.



Remarks

The APPEARANCE_TYPE_* values are references to rownumbers in the appearance.2da file - which means that you can use the value returned by this function to determine stuff about the creature such as height, moverate, sizecategory, etc.

You can use SetAppearance to set a different appearence. This will always return the current appearance - including if the person is polymorphed!


Version

1.30

Example

// If we are 0 to 5, it is one of the PC's races - we do a 
// special emote (woohoo cheer emote!)

void main()
{
    // As values are 0+, we can check <= 5 for 0 to 5.
    if(GetAppearanceType() <= 5)
    {
        PlayAnimation(ANIMATION_FIREFORGET_VICTORY1);
    }
}

See Also

functions: SetPhenoType
categories: Get Data from Creature Functions
constants: APPEARANCE_TYPE_* Constants


 author: Charles Feduke, editor: Jasperre