coding help

Started by AkuShadow, December 16, 2020, 05:09:23 PM

Previous topic - Next topic

AkuShadow

Can someone explain what this code is doing:
[State -3, exsound]
type = PlaySnd
Triggerall = var(21) = 3
Trigger1 = movetype = H && var(20) > 0 && var(21) > 0
Trigger2 = stateno = 9010 || stateno = 5150
Value = F25,0
volumescale = 999
channel = 0

NotAGoodName

So it's going to play a sound.  That sound is 25,0 from the lifebars...   Not sure what sound that is supposed to be, but ok.

It will play when var(21) is 3
And...
If you're in a hit state, and var(20) is > 0, and var(21) > 0 which is useless because var(21) has to be 3, lol
Or...
You're in stateno 9010 or 5150 (laying on the ground dead)

Probably for a Mortal Kombat character to make it say Finish Him/Her.

AkuShadow

Quote from: NotAGoodName on December 17, 2020, 09:45:33 AM
So it's going to play a sound.  That sound is 25,0 from the lifebars...   Not sure what sound that is supposed to be, but ok.

It will play when var(21) is 3
And...
If you're in a hit state, and var(20) is > 0, and var(21) > 0 which is useless because var(21) has to be 3, lol
Or...
You're in stateno 9010 or 5150 (laying on the ground dead)

Probably for a Mortal Kombat character to make it say Finish Him/Her.

So I could shorten it to this?:

[State -3, exsound]
type = PlaySnd
Triggerall = var(21) = 3
Trigger1 = movetype = H && var(20) > 0
Trigger2 = stateno = 9010 || stateno = 5150
Value = F25,0
volumescale = 999
channel = 0

AkuShadow

So yes it does still work.
Var(20) is dmg count and Var(21) is the hit count.
If anyone needs a bit of code for combo announcer.
Although the announcer will stop if p2 is hit again
before the announcement finishes.
-Thanks "NotAGoodName"