Super Colors and Thok Trail

Status
Not open for further replies.
Alright, so I've got a couple questions:

1: Is there a way to change the super colors for a custom character? If so, how?

2: When my shitty recolor turns super, his thok trail gets replaced with the "missing sprite" sprite whenever I thok, spin while running quickly, and spindashing. This continues even after he's no longer super. How can I fix this?
 
...that's weird then, thokitem/spinitem/revitem should all default to MT_THOK if you don't set them. Did you modify that object type or its states in any way at all?
 
You can solve the first issue with a neat Lua script:

Code:
addHook("ThinkFrame", do
    for player in players.iterate
        if player.powers[pw_super] and player.mo and player.mo.skin == "sonic"
            if player.mo.color == SKINCOLOR_SUPER1 then player.mo.color = SKINCOLOR_BLUE
            elseif player.mo.color == SKINCOLOR_SUPER2 then player.mo.color = SKINCOLOR_ORANGE
            elseif player.mo.color == SKINCOLOR_SUPER3 then player.mo.color = SKINCOLOR_RED
            elseif player.mo.color == SKINCOLOR_SUPER4 then player.mo.color = SKINCOLOR_GREEN
            elseif player.mo.color == SKINCOLOR_SUPER5 then player.mo.color = SKINCOLOR_PINK
            end
        end
    end
end)
Replace "sonic" with your character's skinname, and replace each skincolor with whatever colors you want your character to glow when he/she is super. :)
 
Thanks! Actually, this also fixed the thok trail. Is there any way to give him a non-super skin color that glows like the super colors?

EDIT: Also, when running, there's a "shadow" image of his animation that stays yellow regardless of the super color.
 
Last edited:
Yeah, the afterimages are spawned before the super color is set each tic (the ThinkFrame hook runs after both), you may be stuck there for now.
 
Yeah, I've previously made a modification where I did the same thing. I've tried using a MobjThinker hook instead of ThinkFrame, and also a MobjSpawn hook for ghost objects, which both failed. So you're unfortunately stuck with the yellow afterimages for now, but thankfully you can set a character's supercolor in 2.2, so it won't be a problem for much longer™.

The super colors glow because there are actually 15 (currently) extra skincolors reserved exclusively for super characters, those being SKINCOLOR_SUPER1 through SKINCOLOR_SUPER5 (as I demonstrated with my Lua script), which are Super Sonic's colors, and then SKINCOLOR_TSUPER1 through 5 and SKINCOLOR_KSUPER1 through 5 for Tails and Knuckles respectively. If you want to make a custom character glow in a similar fashion, you'll have to concoct your own set of colors from lightest to darkest. For instance, a super red I made uses White, Peach, Orange, Red, and Dark Red. You can, of course, use the super skin colors in such a concoction as well.
 
So I would have to make my own skin colors to use then?

EDIT: Since the super color I want is neon green.
 
Last edited:
No, you can't make your own skincolors unfortunately. You have to use the ones that are already in the game. Apologies if that was unclear! Make the best gradient you can using five of the 40 available skin colors. As I detailed above, I was able to make a red supercolor by having the player cycle through White, Peach, Orange, Red, and Dark Red.

Neon Green is a bit hard to make as a good-looking supercolor since SRB2's green skincolors are very different from each other. The best result I was able to produce cycles through White, Cyan, Neon Green, Zim, and Green, in that order. Optimally I'd rather put Olive somewhere in the mix instead of Cyan, but there was no order I could put it in that looked smooth enough to me. You might have to edit it a bit to make it look right for your character, but you'll probably have to sacrifice that smoothness.
Code:
addHook("ThinkFrame", do
    for player in players.iterate
        if player.powers[pw_super] and player.mo and player.mo.skin == "sonic"
            if player.mo.color == SKINCOLOR_SUPER1 then player.mo.color = SKINCOLOR_WHITE
            elseif player.mo.color == SKINCOLOR_SUPER2 then player.mo.color = SKINCOLOR_CYAN
            elseif player.mo.color == SKINCOLOR_SUPER3 then player.mo.color = SKINCOLOR_NEONGREEN
            elseif player.mo.color == SKINCOLOR_SUPER4 then player.mo.color = SKINCOLOR_ZIM
            elseif player.mo.color == SKINCOLOR_SUPER5 then player.mo.color = SKINCOLOR_GREEN
            end
        end
    end
end)
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top