HorseIfNotDefaultAppearanceChange(object)
Change a creature to its standard race appearance if necessary.
void HorseIfNotDefaultAppearanceChange( object oCreature );
Parameters
oCreature
The creature to be reset.
Description
This function will check the appearance of oCreature. If it is not set to the default racial appearance (see racialtypes.2da) then it will call the HorseChangeToDefault() function.
Remarks
This can be used to remove a mounted appearance from a PC imported from the server vault.
It may also be useful after cutscenes, and in conjunction with custom mounting and dismounting systems.
The outcome of this function is identical to HorseChangeToDefault.
Known Bugs
The creature is reset from large to normal phenotype.
Requirements
#include "x3_inc_horse"
Version
1.69
Example
// Example which fixes the phenotype bug #include "x3_inc_horse" void main() { object oPC = GetPCSpeaker(); int nPheno = GetPhenoType(oPC); string sPheno = Get2DAString("phenotype", "Label", nPheno); if(GetStringLeft(sPheno, 1) == "L") { nPheno = 2; // Large } else { nPheno = PHENOTYPE_NORMAL; } HorseIfNotDefaultAppearanceChange(oPC); SetPhenoType(nPheno, oPC); }
See Also
functions:  | HorseChangeToDefault |
categories:  | Horse Functions |
author: Proleric, editor: Mistress