This is a sort of repost of the code I've talked about in my thread asking about this. I've decided to put this here in order since there's probably some people who would like to know. This code was modified by me from code made by DavidGee and Warusaki3. Although Warusaki3 has some code like this in their JJBA characters, the code I modified is more condensed. It's also a near perfect recreation of the Special KO from JJBA, which is sometimes what people look for in code snippets (I've seen tons of code for X-like mechanic/vfxs).
There are a few steps that you'll have to do beforehand:
- Make a 200 x 200 KO portrait for your character and insert it in an empty group and index.
- Rip Warusaki3's special KO background from their JJBA characters. I've yet to find anyplace that has the special KO background, so this is your best bet. Make sure to insert all of it into its own group.
- Make sure the KO background sprites are aligned at 0,0. The KO portrait should be aligned 100,130.
- Make an animation with nothing inside of it. Nothing at all.
- Make individual animations for each background portion. They should be aligned 0,0 and be stagnant
- Make a unique animation for your KO portrait. This is the only element that has any actual animation. You're going to have to make it smoothly come in hard from the opposite side your character would be facing and then slow down once it reaches your side. It shouldn't stop once it does however.
After that you can follow the code below
Spoiler, click to toggle visibilty
State Def -2 code:
[State -2: Helper]
type = Helper
triggerall = var(3) = 1 ;(triggers via var3, a timer that will only play it once)
trigger1 = (LoseKO) && (enemy,hitdefattr = SCA, HA, HT) ; (Are you already dead? Did the enemy hit you with a move that's seen as a hyper?)
helpertype = Normal
name = "RETIRED"
id = 8730 ;or whatever your not statedef -2 code is at
postype = p1
facing = 0
stateno = 8730 ;same ordeal
keyctrl = 0
ownpal = 1
supermovetime = 1000
pausemovetime = 1000
ignorehitpause = 1
[State -2]
type = playsnd
triggerall = var(3) = 1
trigger1 = (loseko) && (enemy,hitdefattr = SCA, HA, HT)
value = 11,3
[State -2 ]
type = VarAdd
triggerall = (loseko)
trigger1 = time > 0
v = 3; <--whatever open value ;This is done so that the small break between roundstate2 and roundstate3 triggers it once and only once
value = 1
[State -2 ]
type = Varset
triggerall = (!loseko)
trigger1 = time = 0
v = 3; <--whatever open value
value = 0
Unique Statedef Code:
[Statedef 8730]
type = S
physics = N
movetype = I
anim = 9999 ;invisible animation (aka an animation with nothing in it)
sprpriority = 4
[State 8730, EnvColor]
type = allpalfx ;(As to make every element react)
trigger1 = time = (10, 60) ;timing based, 10 initates the add method of this state and 30 does the next. 60 is there for fun.
add = 3*(time-10),3*(time-10),3*(time-10)
time = 1
persistent = 1
ignorehitpause = 1
[State 8730, EnvColor]
type = allpalfx
trigger1 = time >= 30
add = 100,100,100
time = 1
persistent = 1
ignorehitpause = 1
[State 8730, Explod]
type = explod
trigger1 = time = 0
anim = 6969 ;This animation mimics the ko portrait animation from hftf. make it slide in and slow down once it hits your side and adjust to your liking.
id = 6969
sprpriority = -150
removetime = 60
bindtime = -1
pos = 50, 100 ;This is for the ko portrait. The one i'm using is 200x200 and placed at 0,0
postype = back
ownpal = 1
supermovetime = -1
pausemovetime = -1
[State 8730, Explod]
type = explod
trigger1 = time = 0
anim = 8730 ;8730-8733 are the background elements that I've gotten from warusaki3's DIO. Place them like the following to achieve the result.
id = 8730
sprpriority = -150
removetime = 60
bindtime = -1
pos = 0, 0 ;They don't get their position defined here but in the modexplod statements
postype = back
ownpal = 1
supermovetime = -1
pausemovetime = -1
[State 8730, Explod]
type = explod
trigger1 = time = 0
anim = 8731
id = 8731
sprpriority = -150
removetime = 60
bindtime = -1
pos = 0, 0
postype = back
ownpal = 1
supermovetime = -1
pausemovetime = -1
[State 8730, Explod]
type = explod
trigger1 = time = 0
anim = 8732
id = 8732
sprpriority = -150
removetime = 60
bindtime = -1
pos = 0, 0
postype = back
ownpal = 1
supermovetime = -1
pausemovetime = -1
[State 8730, Explod]
type = explod
trigger1 = time = 0
anim = 8733
id = 8733
sprpriority = -150
removetime = 60
bindtime = -1
pos = 0, 0
postype = back
ownpal = 1
supermovetime = -1
pausemovetime = -1
[State 8730, Explod]
type = Explod
trigger1 = Time = 0
anim = 8730
id = 8735 ;A repeat so that the different elements can extend the animation out longer.
pos = 0,0
postype = back
sprpriority = -150
ownpal = 0
bindtime = -1
removetime = 60
pausemovetime = -1
supermovetime = -1
[State 8730, Explod]
type = Explod
trigger1 = Time = 0
anim = 8731
id = 8736
pos = 0,0
postype = back
sprpriority = -150
ownpal = 0
bindtime = -1
removetime = 60
pausemovetime = -1
supermovetime = -1
[State 8730, Explod]
type = Explod
trigger1 = Time = 0
anim = 8732
id = 8737
pos = 0,0
postype = back
sprpriority = -150
ownpal = 0
bindtime = -1
removetime = 60
pausemovetime = -1
supermovetime = -1
[State 8730, Explod]
type = Explod
trigger1 = Time = 0
anim = 8733
id = 8738
pos = 0,0
postype = back
sprpriority = -150
ownpal = 0
bindtime = -1
removetime = 60
pausemovetime = -1
supermovetime = -1
[State 8730, ModifyExplod]
type = ModifyExplod
trigger1 = Numexplod(8730)
Id = 8730
postype = back
pos = -(time*8)%512,-8 ;Makes the background move like the game. This actually gets replaced by the copy to make it seem seamless.
ignorehitpause = 1
[State 8730, ModifyExplod]
type = ModifyExplod
trigger1 = Numexplod(8731)
Id = 8731
postype = back
pos = -(time*12)%512,88 ;These also have different rates because the OG one does. You could try to sync them together but I don't think they were even made for that.
ignorehitpause = 1
[State 8730, ModifyExplod]
type = ModifyExplod
trigger1 = Numexplod(8732)
Id = 8732
postype = back
pos = -(time*16)%512,152
ignorehitpause = 1
[State 8730, ModifyExplod]
type = ModifyExplod
trigger1 = Numexplod(8733)
Id = 8733
postype = back
pos = -(time*20)%512,216
ignorehitpause = 1
[State 8730, ModifyExplod]
type = ModifyExplod
trigger1 = Numexplod(8735)
Id = 8735
postype = back
pos = 512-(time*8)%512,-8 ;the 512 is here to make it timed to the end of the respective parts. Thus making it seem longer and seamless.
ignorehitpause = 1
[State 8730, ModifyExplod]
type = ModifyExplod
trigger1 = Numexplod(8736)
Id = 8736
postype = back
pos = 512-(time*12)%512,88
ignorehitpause = 1
[State 8730, ModifyExplod]
type = ModifyExplod
trigger1 = Numexplod(8737)
Id = 8737
postype = back
pos = 512-(time*16)%512,152
ignorehitpause = 1
[State 8730, ModifyExplod]
type = ModifyExplod
trigger1 = Numexplod(8738)
Id = 8738
postype = back
pos = 512-(time*20)%512,216
ignorehitpause = 1
[State 8730, RemoveExplod] ;This removes all of your explods in one go.
type = RemoveExplod
trigger1 = time = 60
trigger2 = roundstate = 4
[State 8730, DestroySelf] ;Removes all the other effects that go on like the screen brightening. If this were off the screen would stay bright after the explod removal
type = DestroySelf
trigger1 = time = 60
trigger2 = roundstate = 4
And that's it! Make sure to credit Warusaki3 and DavidGee for the code and sprites used for this. I hope you'll find this helpful!