HorseChangeToDefault
Contents |
[edit] HorseChangeToDefault(object)
Change a creature to its standard race appearance.
void HorseChangeToDefault( object oCreature );
[edit] Parameters
oCreature
The creature to be reset.
[edit] 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.
[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.
[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; } HorseChangeToDefault(oPC); SetPhenoType(nPheno, oPC); }
[edit] See Also
functions: |
author: Proleric, editor: Mistress