Jump to content

Home

How to change your apperence using code in K1?


SithRevan

Recommended Posts

Hey everybody, I was wondering if you guys would be able to help me with something. I am trying to make a script that will change the appearence of me or anybody who is around me if I choose. I have tried a couple times to make this code and I was unsuccessful. So if you guys could help me out a bit I would be extremely greatful. Oh yeah also just so you guys know I want this code to kinda work like the TSL hakpad's code in the sense that it will change my appearence to any appearence in the game and then back to my own appearence again. Thanks for the help everybody.

Link to comment
Share on other sites

Hey everybody, I was wondering if you guys would be able to help me with something. I am trying to make a script that will change the appearence of me or anybody who is around me if I choose.

 

As far as I am aware the ChangeObjectAppearance() function is a new addition to TSL, so you wouldn't be able to change the appearance directly in K1.

 

The only alternative I can think of is using EffectDisguise() instead, where you set the line number in appearance.2da as parameter. Then you'll apply it as a Permanent duration effect to the character you want to change the appearance of. When you want them to return to their old appearance again you just remove the effect from them.

 

For example, to look like Bastila you could use:

void main() {
   effect eShape = EffectDisguise(4);
   ApplyEffectToObject(DURATION_TYPE_PERMANENT, eShape, OBJECT_SELF);
}

 

...and to return to your normal shape again you could use:

 

void main() {
   effect eEff = GetFirstEffect(OBJECT_SELF);

   while (GetIsEffectValid(eEff)) {
       if (GetEffectType(eEff) == EFFECT_TYPE_DISGUISE) {
           RemoveEffect(OBJECT_SELF, eEff);    
       }
       eEff = GetNextEffect(OBJECT_SELF);  
   }   
}

 

Be careful about changing to a head/body separated appearance without an armor model specified if you wear armor though, since the game tends to crash if you do.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...