HorseIfNotDefaultAppearanceChange

From NWN Lexicon


Contents

[edit] HorseIfNotDefaultAppearanceChange(object)

Change a creature to its standard race appearance if necessary.

[edit] Parameters

oCreature

The creature to be reset.


[edit] 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.



[edit] 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.


[edit] Known Bugs

The creature is reset from large to normal phenotype.


[edit] Requirements

#include " x3_inc_horse "

[edit] Version

1.69

[edit] 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);
}

[edit] See Also

functions: 

HorseChangeToDefault



author: Proleric, editor: Mistress

Personal tools
Categories