SetCreatureAppearanceType() Question
Zephirius
Member Posts: 419
Right now, the player is cursed and in the form of a werebear.
How do I Change the appearance back into the PC? I looked for an appropriate constant but didn't find what I was looking for.
How do I Change the appearance back into the PC? I looked for an appropriate constant but didn't find what I was looking for.
DelayCommand(3.0, SetCreatureAppearanceType(oPC, ???));
0
Comments
Some lines have pre-defined constants APPEARANCE_TYPE_* for legibility.
Be careful, though. This will change the appearance, but nothing else.
Typically, the method used to curse the player will store the original appearance and other properties for reference, and provide a reverse function. For example, EffectPolymorph is entirely reversed by removing the effect.
I've stored the appearance but when I recall the PC's original state, she comes back headless. Now as far as I know it's original head model and not a custom one...
Well, there is, behind the scenes. When a part-based creature changes appearance type, the old component parts are still held in the creature object. You can see this if you examine the files in a saved game. Restoring the original appearance (one number) recovers all that stored detail.
That can have unintended consequences if the wrong part-based appearance number is used. For example, if start_appearance doesn't exist, it will return zero (dwarf iirc) and the head may disappear if not defined for that race.
Would that also explain the missing head?
I notice that if the PC has multiple effects, the appearance is changed multiple times - maybe try doing that just once, outside the effects loop?
Did you verify that start_appearance is returning the correct value?
When I saved the appearance, this is what it looks like. Is this correct?
You need
then restore with