Author Topic: Changing skin tone via scripts, is it possible?  (Read 314 times)

Legacy_thepaphjort

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
Changing skin tone via scripts, is it possible?
« on: April 11, 2012, 09:46:21 pm »


                For example I wish to make a copy of an NPC when he dies and "raise" him as a zombie, changing the skin tone to something suitable for a zombie. 
I've found the numbered chart for skin tones, but can´t find a function that lets me change the color. Is is possible to do it? 
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Changing skin tone via scripts, is it possible?
« Reply #1 on: April 11, 2012, 10:21:10 pm »


               // Get the Color of oObject from the color channel specified.
// - oObject: the object from which you are obtaining the color.
//            Can be a creature that has color information (i.e. the playable races).
// - nColorChannel: The color channel that you want to get the color value of.
//                   COLOR_CHANNEL_SKIN
//                   COLOR_CHANNEL_HAIR
//                   COLOR_CHANNEL_TATTOO_1
//                   COLOR_CHANNEL_TATTOO_2
// * Returns -1 on error.

int GetColor(object oObject, int nColorChannel)



// Set the color channel of oObject to the color specified.
// - oObject: the object for which you are changing the color.
//            Can be a creature that has color information (i.e. the playable races).
// - nColorChannel: The color channel that you want to set the color value of.
//                   COLOR_CHANNEL_SKIN
//                   COLOR_CHANNEL_HAIR
//                   COLOR_CHANNEL_TATTOO_1
//                   COLOR_CHANNEL_TATTOO_2
// - nColorValue: The color you want to set (0-175).

void SetColor(object oObject, int nColorChannel, int nColorValue)
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
Changing skin tone via scripts, is it possible?
« Reply #2 on: April 11, 2012, 10:25:56 pm »


               The NPC must use full animation set, to do this.
               
               

               
            

Legacy_thepaphjort

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
Changing skin tone via scripts, is it possible?
« Reply #3 on: April 12, 2012, 09:44:53 am »


               Perfect! Thank you! Great that there are still helpful people around, even 10 years after release... :-)