YesNoOk
avatar

coding help (Read 1168 times)

Started by Goutetsu2, December 16, 2020, 05:09:23 PM
Share this topic:
coding help
New #1  December 16, 2020, 05:09:23 PM
  • avatar
  • *
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
Last Edit: December 18, 2020, 06:25:01 AM by Goutetsu2
Re: coding help
#2  December 17, 2020, 09:45:33 AM
  • avatar
  • **
    • USA
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.
Re: coding help
#3  December 17, 2020, 01:29:35 PM
  • avatar
  • *
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
Re: coding help
#4  December 18, 2020, 05:31:53 AM
  • avatar
  • *
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"