SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Editing > Editing Help

Reply
 
Thread Tools Search this Thread
Old 07-28-2017   #1
Yoshirocks90
Eh, maybe later.
 
Yoshirocks90's Avatar
Default Super Colors and Thok Trail

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?
Yoshirocks90 is offline   Reply With Quote
Old 07-28-2017   #2
Monster Iestyn
Friendly Neighbour-Hood
Moderator
 
Monster Iestyn's Avatar
Default

What did you set as your thokitem?
__________________
My page stuffed full of MIDI goodness!
The Hitchhiker's Guide to the Robo-Hoodiverse
Timeline of Sonic Robo Blast History!

That's an uppercase i, not a lowercase L, for the record.
Monster Iestyn is offline   Reply With Quote
Old 07-28-2017   #3
Yoshirocks90
Eh, maybe later.
 
Yoshirocks90's Avatar
Default

I didn't set it.
Yoshirocks90 is offline   Reply With Quote
Old 07-28-2017   #4
Monster Iestyn
Friendly Neighbour-Hood
Moderator
 
Monster Iestyn's Avatar
Default

...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?
__________________
My page stuffed full of MIDI goodness!
The Hitchhiker's Guide to the Robo-Hoodiverse
Timeline of Sonic Robo Blast History!

That's an uppercase i, not a lowercase L, for the record.
Monster Iestyn is offline   Reply With Quote
Old 07-28-2017   #5
Yoshirocks90
Eh, maybe later.
 
Yoshirocks90's Avatar
Default

No. It works normally until I turn super, then the problem starts.
Yoshirocks90 is offline   Reply With Quote
Old 07-28-2017   #6
Lach
Latch? Lock?? Lack???
 
Lach's Avatar
Default

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. :)
__________________
Check out my new SRB2 YouTube channel!
Cool mods I made:
Orb
Combine Ring Monitors
Lach is offline   Reply With Quote
Old 07-28-2017   #7
Yoshirocks90
Eh, maybe later.
 
Yoshirocks90's Avatar
Default

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 by Yoshirocks90; 07-28-2017 at 07:32 PM. Reason: Noticed something, and asked about it
Yoshirocks90 is offline   Reply With Quote
Old 07-28-2017   #8
Monster Iestyn
Friendly Neighbour-Hood
Moderator
 
Monster Iestyn's Avatar
Default

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.
__________________
My page stuffed full of MIDI goodness!
The Hitchhiker's Guide to the Robo-Hoodiverse
Timeline of Sonic Robo Blast History!

That's an uppercase i, not a lowercase L, for the record.
Monster Iestyn is offline   Reply With Quote
Old 07-28-2017   #9
Lach
Latch? Lock?? Lack???
 
Lach's Avatar
Default

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.
__________________
Check out my new SRB2 YouTube channel!
Cool mods I made:
Orb
Combine Ring Monitors
Lach is offline   Reply With Quote
Old 07-28-2017   #10
Yoshirocks90
Eh, maybe later.
 
Yoshirocks90's Avatar
Default

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 by Yoshirocks90; 07-29-2017 at 02:18 AM.
Yoshirocks90 is offline   Reply With Quote
Old 07-29-2017   #11
Lach
Latch? Lock?? Lack???
 
Lach's Avatar
Default

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)
__________________
Check out my new SRB2 YouTube channel!
Cool mods I made:
Orb
Combine Ring Monitors
Lach is offline   Reply With Quote
Old 07-29-2017   #12
Yoshirocks90
Eh, maybe later.
 
Yoshirocks90's Avatar
Default

Ok, thanks.
Yoshirocks90 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:51 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.