Here is a sample of changing the size to tiny. This type of change will keep the original race and creature speed (assuming the Toolset setting for the speed is not different from the appearance.2da row). My delays are probably longer than what is needed, and if performing this on a PC, (or a creature that might enter combat) you may have to set the controllable state to FALSE.
void SetTinySize(object oCreature = OBJECT_SELF)
{
int nAppearance =GetAppearanceType(oCreature);
SetCreatureAppearanceType(oCreature, APPEARANCE_TYPE_BADGER);
DelayCommand(5.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectPolymorph(0), oCreature, 10.0));
DelayCommand(20.0, SetCreatureAppearanceType(oCreature, nAppearance));
}
EDIT: Just realized I had used a non-standard polymorph from back when I was testing huge weapons in both shifted and unshifted forms. Polymorph number corrected to 0.
Modifié par WhiZard, 04 juin 2012 - 06:24 .