YesNoOk
avatar

Custom Get-Hit animations (WITHOUT CUSTOM STATES)! (Read 21082 times)

Started by MDCGD, July 29, 2021, 12:21:34 am
Share this topic:
Custom Get-Hit animations (WITHOUT CUSTOM STATES)!
New #1  July 29, 2021, 12:21:34 am
  • avatar
  • **
    • USA
Don't know if this information was released but here's what I've came up with without using Custom states. You'll have to edit get-hit states "Shaking" and "knock back" depending on which statetype you want to customize (SCA). For this example, I'll just use "Standing" states 5000-5001.

First, let's look at 5000 in particular, the ChangeAnim state controllers:

Spoiler, click to toggle visibilty

Easiest way to do this is first separate all the GH animations into their OWN ChangeAnims. Then you have to pick which hit anim you'd like to have variants for depending on certain conditions and pick the right triggers to manipulate the outcome. For my project I wanted a different Standing Hard GH animation if the hittime is 30+. I execute that by creating 2 different ChangeAnim for Hard GH, one triggers if hittime<30 and one triggers if hittime>=30. Check it out:

Spoiler, click to toggle visibilty

 As you can see, for my Harder standing GH I created anim 5003 for "shaking" and 5008 for "knocked back".

After that's done we go over to state 5001 and change ChangeAnim control as well as add another one.

ORIGINAL:

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10

CUSTOM

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0 && GetHitVar(hittime)<30
value = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10

[State 5001, 2]
type = ChangeAnim
trigger1 = statetype = S
trigger1 = AnimTime = 0 && GetHitVar(hittime)>=30
value = 5008

and that's it! If you're adept at coding, you can take this basic idea and create as many variations as you want for any and all GET-HITs (Standing,Crouch,Air,Light, Medium, Hard,etc.) triggered by any condition (GethitVar, hitdefattr, etc). This is especially useful if you're not making a full game and want to customize hit states but also have your character compatible with others.

This concept can also be applied to blocking if you're interested in having varied blocking animations.
Follow Twitter: @MVDCGD
Subscribe Youtube: MVDCGD
Last Edit: July 30, 2021, 01:08:10 am by MDCGD