Aller au contenu

Photo

Changing skin tone via scripts, is it possible?


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
thepaphjort

thepaphjort
  • Members
  • 10 messages
 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? 

#2
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
// 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)

#3
ShadowM

ShadowM
  • Members
  • 768 messages
The NPC must use full animation set, to do this.

#4
thepaphjort

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