YesNoOk
avatar

Adding sounds to get-hit animations (Read 2100 times)

Started by PRØJECT.13, March 09, 2020, 04:42:55 am
Share this topic:
Adding sounds to get-hit animations
#1  March 09, 2020, 04:42:55 am
  • ***
    • USA
    • YouTube.com/MugenX000
I'm trying to make it so certain sounds will play upon a character getting hit, specifically the metallic hitsounds that play in the Vs. games when characters like Iron Man, Sentinel and Dr. Doom get hit. I have the sounds and I know I need to add them into the snd file, but what exactly is the line of code I need to get the sounds to play upon the characters getting hit, and where and how do I properly apply them?
Re: Adding sounds to get-hit animations
#2  March 09, 2020, 04:52:16 am
  • ****
  • CPU Purple Heart
    • USA
    • https://www.pixiv.net/en/users/8108265
 It really would be done in a similar manner as how gethit voices are implemented. Have them play in statedef -2 in accordance to a gethitvar so that they also work in various custom hitstates. They won't work in all custom gethits, but it's definitely more reliable than putting the playsnd state controllers in the 5000 gethit state series.

 Example for what I use to have gethit voices play, which can be applied to metallic gethit sounds.

Quote
[State -2, Hitsound]
type = PlaySnd
triggerall = stateno != [120,155] ;Optional if you don't want it to play while guarding.
triggerall = random <= 400 ;this can be removed since you want it to play at every hit.
triggerall = gethitvar(hitshaketime) = 1
triggerall = Life > 0 ;this can be removed since I am sure the metal gethit sound should still play even after being KO'd.
trigger1 = gethitvar(animtype) = [0,5]
value = s11,5000+random%6 ;Replace this with whatever sound you want for metallic gethits.
channel = 1
ignorehitpause = 1
Re: Adding sounds to get-hit animations
#3  March 09, 2020, 05:17:18 am
  • ***
    • USA
    • YouTube.com/MugenX000
It works to an extent, but how do I do this with multiple animations and sounds? It only plays one sound through each hit animation. There's also a bit if a delay before the sound actually plays, rather than doing so immediately.
Re: Adding sounds to get-hit animations
#4  March 09, 2020, 05:51:42 am
  • ****
  • CPU Purple Heart
    • USA
    • https://www.pixiv.net/en/users/8108265
 I suppose identify the animations and the animelemtime of your choice in place of both the gethitvar(animtype) and gethitvar(hitshaketime(, which I can't really elaborate any further since I don't really have enough knowledge of the character in question, let alone the full extent of what is to be tweaked.