Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

How to change your apperence using code in K1?

Page: 1 of 1
 SithRevan
12-15-2006, 2:13 PM
#1
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.
 stoffe
12-15-2006, 2:17 PM
#2
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.
Page: 1 of 1