Animated Skin Colors

[Open Assets] Animated Skin Colors V3A

What permissions do you give others to modify and/or maintain your submission?
Modify: YES - Maintain: YES - I give permission for my entire submission to be modified by others or used in their own work. I give permission for my entire submission to be maintained by others as well.
I made sure my file(s) follow the Submissions Guidelines
  1. Yes
I named my file(s) correctly (see Filename Conventions)
  1. Yes
A very simple addon that adds a way to create animated skin colors.
This script only gives you a library to work with in order to create animated skin colors, and 1 animated skin color as an example.

To create an animated skin color, you must first define the skin color normally through lua, then use the functions animatedSkinColor.makeAnimated and animatedSkinColor.addRamp.

Documentation


Function(Args)ReturnDescription
animatedSkinColor.makeAnimated(SKINCOLOR [, tic_t delay])animatedSkinColorCreates the base for an animated skin color and sets the delay. Default delay is 4 tics
animatedSkinColor.addRamp(SKINCOLOR,table ramp [, table ...])animatedSkinColorAdds one or multiple ramps to an animated skin color.
animatedSkinColor.setDelay(SKINCOLOR,tic_t delay)animatedSkinColorSets the delay between ramps.

Example

Example Color:
-- Freeslot & Define
freeslot("SKINCOLOR_RAINBOW")
skincolors[SKINCOLOR_RAINBOW] = {
name = "Rainbow",
ramp = {32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47},
invcolor = SKINCOLOR_BLACK,
invshade = 0,
chatcolor = V_REDMAP,
accessible = true}
-- Make animated & Add Ramps
animatedSkinColor.makeAnimated(SKINCOLOR_RAINBOW,5).addRamp(SKINCOLOR_RAINBOW,
{32    ,33    ,34    ,35    ,36    ,37    ,38    ,39    ,40    ,41    ,42    ,43    ,44    ,45    ,46    ,47    },
{210,32    ,33    ,34    ,34    ,34    ,37    ,38    ,39    ,40    ,41    ,63    ,43    ,44    ,45    ,46    },
{219,210,32    ,33    ,34    ,34    ,34    ,59    ,205,205,61    ,61    ,63    ,63    ,63    ,45    },
{217,218,210,32    ,54    ,55    ,56    ,58    ,58    ,58    ,59    ,60    ,61    ,63    ,63    ,63    },
{48    ,49    ,50    ,51    ,52    ,53    ,54    ,55    ,56    ,57    ,58    ,59    ,60    ,61    ,62    ,63    },
{208,84    ,49    ,51    ,52    ,53    ,55    ,57    ,57    ,58    ,58    ,59    ,60    ,61    ,62    ,63    },
{208,84    ,84    ,64    ,74    ,53    ,54    ,55    ,56    ,57    ,58    ,59    ,60    ,61    ,62    ,63    },
{81    ,82    ,83    ,72    ,74    ,65    ,75    ,222,225,225,68    ,69    ,69    ,61    ,62    ,63    },
{81    ,82    ,83    ,72    ,73    ,74    ,75    ,66    ,67    ,67    ,68    ,69    ,69    ,61    ,62    ,63    },
{88    ,88    ,188,188,188,189,190,76    ,77    ,77    ,78    ,79    ,233,70    ,70    ,63    },
{88    ,96    ,96    ,97    ,97    ,99    ,100,102,103,191,105,94    ,251,236,237,239},
{96    ,112,112,98    ,98    ,100,101,103,103,105,105,107,108,95    ,25    ,26    },
{96    ,112,112,113,113,114,114,115,115,116,116,117,118,118,119,119},
{96    ,112,112,113,113,114,114,115,115,116,116,117,118,118,119,119},
{120,96    ,122,122,122,123,123,124,115,126,126,117,127,118,110,110},
{120,129,121,121,122,123,123,124,125,143,143,117,127,138,110,110},
{120,120,121,121,122,123,123,124,125,143,143,127,127,138,139,139},
{120,120,121,121,122,123,123,124,125,143,143,127,127,138,139,139},
{128,129,121,130,131,133,133,125,142,143,143,118,118,138,139,139},
{128,129,130,131,131,132,141,135,142,137,137,138,138,110,139,139},
{128,129,130,131,132,133,134,135,136,137,137,138,138,139,139,139},
{128,129,130,132,133,134,135,136,137,138,138,138,138,139,139,139},
{128,5    ,140,133,134,135,136,137,150,138,138,139,139,158,159,253},
{2    ,5    ,146,170,147,148,149,150,151,154,155,156,157,158,158,159},
{144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159},
{4    ,145,161,147,148,149,150,151,152,153,154,155,156,157,158,159},
{176,160,147,147,194,196,164,166,167,168,168,168,168,169,169,159},
{145,161,162,162,163,164,164,166,166,167,167,168,168,169,169,169},
{160,161,162,162,163,164,164,165,165,166,166,167,167,168,168,169},
{160,161,192,162,163,164,164,165,165,165,165,167,167,168,168,169},
{200,177,192,192,163,183,183,184,184,185,185,167,167,168,168,169},
{200,177,178,179,180,182,183,184,184,184,184,185,185,186,187,187},
{176,177,178,179,180,181,182,183,183,184,184,185,185,186,187,187},
{176,177,178,179,180,181,182,183,183,184,184,185,185,186,187,187},
{200,177,178,178,179,204,204,183,206,206,184,207,185,186,187,187},
{200,200,201,178,179,203,203,205,206,206,206,206,197,198,199,199},
{200,200,201,201,202,203,203,204,205,205,206,206,197,198,199,199},
{209,177,32    ,202,33    ,204,204,205,206,206,206,207,197,198,199,199},
{201,210,202,33    ,34    ,204,205,205,206,206,207,207,63    ,199,46    ,47    },
{210,32    ,33    ,34    ,35    ,37    ,37    ,38    ,39    ,40    ,41    ,42    ,44    ,71    ,46    ,47    })



You can include this in your mods, it will automatically check if it already exists.


ringracers0001.gif
Author
ChrisFurry
Downloads
597
Views
3,900
Extension type
lua
File size
5.7 KB
MD5 Hash
a84620367fd9bd970d23482439a61469
First release
Last update

More resources from ChrisFurry

Share this resource

Latest updates

  1. Version 3A - I didn't catch a small bug

    Figured out my code was slightly broken by working, whoops. Changes Color loop code is fixed...
  2. Version 3 : Overhaul

    Everything has been changed in this update, and the description will be changed soon so the...
  3. The Update that makes this addon

    I don't really know what to title this update but I really should have done this before...
Back
Top