Tutorial: Making Tinted Creatures in the Toolset

Various Guides and Tutorials provided by Custom Content creators.

Moderator: CEP Team

Tutorial: Making Tinted Creatures in the Toolset

Postby 420 » Fri Jan 22, 2010 7:45 pm

1. Edit the creature blueprint and set the appearance to an appropriate invisible creature.

CEPTintStep1a.jpg
CEPTintStep1a.jpg (146.11 KiB) Viewed 247 times


2. Set the tail to the desired tintable creature.

CEPTintStep1b.jpg
CEPTintStep1b.jpg (119.97 KiB) Viewed 247 times


3. Change the creature's OnSpawn script to "zep_tintonspawn"

CEPTintStep2.jpg
CEPTintStep2.jpg (150.07 KiB) Viewed 247 times


Alternately, If you are using a custom OnSpawn script simply add these lines:
Code: Select all
//:://////////////////////////////////////////////
//:: CEP Tintable Creature OnSpawn Script
//:: Created By:   420
//:: Created On:   January 21, 2010
//:://////////////////////////////////////////////
/*
This script will set color channels for a creature when it spawns allowing
builders to make tinted creature blueprints in the toolset.

See the "CEP Sample Tinted Creature" blueprint under Tutorial in the Custom
creature palette for an example. Step by step instructions are located in the
blueprint's Comments tab.
*/
int nApp = GetAppearanceType(OBJECT_SELF);
SetCreatureAppearanceType(OBJECT_SELF, 0);
SetColor(OBJECT_SELF, COLOR_CHANNEL_HAIR, GetLocalInt(OBJECT_SELF, "Hair"));
SetColor(OBJECT_SELF, COLOR_CHANNEL_SKIN, GetLocalInt(OBJECT_SELF, "Skin"));
SetColor(OBJECT_SELF, COLOR_CHANNEL_TATTOO_1, GetLocalInt(OBJECT_SELF, "Tattoo1"));
SetColor(OBJECT_SELF, COLOR_CHANNEL_TATTOO_2, GetLocalInt(OBJECT_SELF, "Tattoo2"));
DelayCommand(1.0, SetCreatureAppearanceType(OBJECT_SELF, nApp));


4. Set local int variables for the desired colors and color channels.

Valid Int Names: Hair, Skin, Tattoo1, and Tattoo2
Valid Int Range: 0-175

CEPTintStep3.jpg
CEPTintStep3.jpg (119.93 KiB) Viewed 247 times


CEPSampleTint.jpg
CEPSampleTint.jpg (188.47 KiB) Viewed 247 times


You can also set the creatures colors when spawning with a trigger. Here an example of a triggers OnEnter script:
(Note: This method overrides any variables set on the blueprint in the toolset.)
Code: Select all
void main()
{
object oWP = GetWaypointByTag("TintSpawnWP");
object oCreature = CreateObject(OBJECT_TYPE_CREATURE, "zep_sampletint", GetLocation(oWP));
SetLocalInt(oCreature, "Skin", 70);
SetLocalInt(oCreature, "Tattoo1", 88);
}

CEPTintTrigger.jpg
CEPTintTrigger.jpg (161.81 KiB) Viewed 247 times
User avatar
420
 
Posts: 611
Joined: Sun Oct 26, 2008 6:30 pm

Re: Tutorial: Making Tinted Creatures in the Toolset

Postby The Amethyst Dragon » Sat Jan 23, 2010 3:43 pm

This looks very promising. Nice work!

For those that want an easy way to find the color integers, I put this little piece together a while ago for my players (for use in changing their PC's colors in-game).

Skin/Hair/Tattoo Color Numbers
User avatar
The Amethyst Dragon
 
Posts: 47
Joined: Mon Oct 27, 2008 3:30 pm
Location: lLoc = GetLocation(oDragon);


Return to Guides and Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest