How to make Supercolors into animated colors

How to make Supercolors into animated colors 1.0.0

So, you updated to 2.2.9 and heard that Animated Skincolors got fixed, but you can't seem to find many animated skincolors out there. Well, this should be able to tide you over in the meantime!

Included In this guide is an example script that makes the supercolor Super Gold into a skincolor, use that if you want to copy & paste or whatever

First, you'll need to have your supercolor available in one form or another, whether it be a SOC or Lua. Have it loaded or include it in a pk3 (I will be using a vanilla supercolor for this example so if you're following this guide with a vanilla color in mind you can skip this step)

Next, you have to create a lua file, inside of it, you must freeslot the color you want to be equal to your supercolor. In this guide they're gonna be named the same but the SKINCOLOR_ constant will have the words switched so it will be SKINCOLOR_GOLDSUPER.

SuperColor.lua:
freeslot("SKINCOLOR_GOLDSUPER")

After that you have to define the color's metadata like any other color but the ramp will be all zeroes, this is because we're going to modif the ramp later. If you have more supercolors allocated you can make the invcolor a different supercolor

Lua:
freeslot("SKINCOLOR_GOLDSUPER")

skincolors[SKINCOLOR_GOLDSUPER] = {
    name = "Super_Gold",
    ramp = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    invcolor = SKINCOLOR_BLUE,
    invshade = 6,
    chatcolor = V_YELLOWMAP,
    accessible = true
}

Now that you have the color allocated, it's time for the ramp modification, using an equation from source that Monster Iestyn showed me, you can make the color pulse like a normal supercolor. You can replace SKINCOLOR_SUPERGOLD1 and SKINCOLOR_GOLDSUPER with your respective supercolors of course

Lua:
freeslot("SKINCOLOR_GOLDSUPER")

skincolors[SKINCOLOR_GOLDSUPER] = {
    name = "Super_Gold",
    ramp = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    invcolor = SKINCOLOR_BLUE,
    invshade = 6,
    chatcolor = V_YELLOWMAP,
    accessible = true
}

addHook("ThinkFrame", do
    skincolors[SKINCOLOR_GOLDSUPER].ramp = skincolors[SKINCOLOR_SUPERGOLD1 + abs( ( (leveltime >> 1) % 9) - 4)].ramp
end)

Now boot up the game and load the script, you should now see your color show up as an animated color and player setup!

srb20559.gif


Feel free to use this with any supercolor on the MB and all the vanilla ones!
If you want to test the script out yourself I attached the script as an example.

Thanks to Monster Iestyn for helping me sort this out when i got the idea to first do this.
Author
Mari0shi
Downloads
863
Views
4,305
Extension type
lua
File size
390 bytes
MD5 Hash
b19f6c4c013af39861ec64971b3e0e4b
First release
Last update

More resources from Mari0shi

Share this resource

Latest reviews

the animated colors tutorial was helpful, thank you!
Upvote 0
this was surely helpful, thanks for making this!
Upvote 1
Welcome to releases!
Upvote 0
Back
Top