HorseChangeToDefault(object)

Change a creature to its standard race appearance.

void HorseChangeToDefault(
    object oCreature
);

Parameters

oCreature

The creature to be reset.


Description

This function will set oCreature to its default racial appearance.

This is useful for reversing any situations where a creature or PC is stuck in some variation of a mounted appearance.

This will also clear ANY information stored on the creature relating to mounting.

If the target had a tail when not mounted, this function will not restore it.



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.


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;
  }     

  HorseChangeToDefault(oPC);
  SetPhenoType(nPheno, oPC);
}

See Also

functions:  HorseIfNotDefaultAppearanceChange
categories:  Horse Functions


author: Proleric, editor: Mistress