kotor2 How can I scrpt an appearance change?
for example I want to script it when fired it changes rusted hk-47 into an hk-50 model. So i can put an option like "HK-47, mind if I repair your outer shell of its rust?" "HK-47: Observation: You seem to have the skills, I will let you"
So the script would then fire and change from model hk-47 to hk-50
thanks for any help,
Randy
kotor2 How can I scrpt an appearance change?
for example I want to script it when fired it changes rusted hk-47 into an hk-50 model. So i can put an option like "HK-47, mind if I repair your outer shell of its rust?" "HK-47: Observation: You seem to have the skills, I will let you"
So the script would then fire and change from model hk-47 to hk-50
Something like this should work:
void main() {
object oHK = GetObjectByTag("hk47");
if (GetIsObjectValid(oHK) && (GetAppearanceType(oHK) == 3)) {
ChangeObjectAppearance(oHK, 538);
}
}
It will check if HK47 uses his old appearance, and if so switch the appearance type to HK50.
(Though for storyline reasons he wouldn't want to, since he says he much prefers his fear-inspiring rust red armor to the plain steel chassi of his cheap clones. :))
actualy that was an example, im trying to do one for mandalore for the no_helmet mandalore
actualy that was an example, im trying to do one for mandalore for the no_helmet mandalore
Another example script that toggles Mandalore's helmet on/off each time it's run:
void main() {
object oCandy = GetObjectByTag("mand");
if (GetIsObjectValid(oCandy)) {
if (GetAppearanceType(oCandy) == 639) {
ChangeObjectAppearance(oCandy, 462);
}
else if (GetAppearanceType(oCandy) == 462) {
ChangeObjectAppearance(oCandy, 639);
}
}
}