The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => Topic started by: BeastwithFriends on June 19, 2023, 10:23:57 pm

Title: Throws don't deal Damage
Post by: BeastwithFriends on June 19, 2023, 10:23:57 pm
I noticed a bug with some characters in my IKEMEN build. Some characters' throws don't deal damage to specific characters. For instance all GM's Street Fighter 3 chars cannot deal damage with throws to any Hyper DBZ Characters. The throws also don't deal damage against Umihei's chars. Is this a common problem? Is there a way to fix this?
Title: Re: Throws don't deal Damage
Post by: PotS on June 25, 2023, 09:34:57 am
I think this happens against any character that overrides the hitting the ground states. The easiest way to fix it is to edit the throws to deal damage at time = x instead of when P2 hits the ground.
Title: Re: Throws don't deal Damage
Post by: BeastwithFriends on July 04, 2023, 06:58:46 am
Thank you! I think that makes sense. Can you give me an example of what that code might look like?

I'm watching this video to try to understand the code a little bit more, but I'm not sure if i get it completely.

https://www.youtube.com/watch?v=II0QQjwq3B4
Title: Re: Throws don't deal Damage
Post by: Odb718 on July 05, 2023, 05:59:05 pm
At 4:30 of that video is when he adds the target life add. But because he uses a negative number it's subtraction.
He uses AnimElem 4 as the trigger, which is similar to
time =
But not exactly the same.
5:04 of the video is how your code should look. But you can edit your trigger1 to be the timing you want.
Title: Re: Throws don't deal Damage
Post by: BeastwithFriends on July 07, 2023, 07:16:50 pm
That helps a lot. Thank you!
Title: Re: Throws don't deal Damage
Post by: BeastwithFriends on November 22, 2024, 10:54:58 pm
It's been a while, and I finally sat down and implemented the code you recommended. It worked for the most part, but there's a little bit of an issue.

1.)When I throw the opponent forward, I deal damage now.

2.)But if I throw the opponent backward, nothing happens still.

Is there separate code for forward and backward throws? I feel like I'm missing something. Sorry for reviving this old topic! Thanks for your help!
Title: Re: Throws don't deal Damage
Post by: WastedCoder on November 23, 2024, 10:30:18 pm
It's been a while, and I finally sat down and implemented the code you recommended. It worked for the most part, but there's a little bit of an issue.

1.)When I throw the opponent forward, I deal damage now.

2.)But if I throw the opponent backward, nothing happens still.

Is there separate code for forward and backward throws? I feel like I'm missing something. Sorry for reviving this old topic! Thanks for your help!

I guess you just need to add the same targetlifeadd controller to the other throwing state, the backward one.
Do the same actions to the different state. :)
Title: Re: Throws don't deal Damage
Post by: Odb718 on November 23, 2024, 11:36:15 pm
@BeastwithFriends: Use Debug (ctrl+d) to view the state's P1 and P2 use during that throw. Then use the targetlifeadd at the timing you think works/looks the best in P1's stateno.
Title: Re: Throws don't deal Damage
Post by: BeastwithFriends on November 24, 2024, 02:01:44 pm
@Odb718 that worked! Thank you so much!

There's a small issue now though. Characters that didn't receive damage previously now receive damage. But other characters that previously worked correctly now receive double damage. I posted the code below. I added the targetlifeadd at the bottom.



[Statedef 820]
type    = S
movetype = A
physics = N
anim = 820
SprPriority = 1

[State -2, TargetState]
type = TargetState
Trigger1 = time = 0
value = 821

[State 810, TargetState]
type = TargetState
Trigger1 = time = 0
trigger1 = target,authorname = "GM"
trigger1 = target,name="Ryu"||target,name="Ken"||target,name="Gouki"||target,name="Sean"||target,name="Ibuki"||target,name="Gill"
value = 822

[State 820, TargetState]
type = TargetState
Trigger1 = time = 0
trigger1 = target,authorname = "GM"
trigger1 = target,name = "Alex"
value = 823

[State 820, âÊëúï\é¶óDêÊìx]
type = SprPriority
trigger1 = AnimElem = 3
trigger2 = AnimElem = 5
value = -1

[State 820, âÊëúï\é¶óDêÊìx]
type = SprPriority
trigger1 = AnimElem = 4
value = 1

[State 820, Throw Reversal]
type = VarSet
Triggerall = var(8) = 1
Triggerall = animelemtime(2) < 0
Trigger1 = (target,Command = "x") && (target,Command = "a")
Trigger2 = var(0) = 0
Trigger2 = (target,Command = "holdfwd") || (target,Command = "holdback")
Trigger2 = (target,Command = "y") || (target,Command = "z") || (target,Command = "b") || (target,Command = "c")
var(8) = 0

[State 820, ChangeState]
type = ChangeState
trigger1 = animelemtime(2) = 0
trigger1 = var(8) = 0
value = 830

[State 821, TargetLifeadd]; added November 24 2024
type = TargetLifeadd
trigger1 = time =60
value = ceil(-120*ifelse(P2StateNo=5100,1.5,1)*fvar(26)*(const(data.attack)*0.01))
persistent = 0
Title: Re: Throws don't deal Damage
Post by: BeastwithFriends on November 26, 2024, 04:07:09 pm
Is there a way to add a condition to TargetLifeadd's that will only trigger if you are throwing characters from a certain author?
Title: Re: Throws don't deal Damage
Post by: Lyrica on November 26, 2024, 05:17:09 pm
Is there a way to add a condition to TargetLifeadd's that will only trigger if you are throwing characters from a certain author?

Yes, the same trigger you're already using in the other sctrls:
trigger1 = target, authorname = "Author"
Title: Re: Throws don't deal Damage
Post by: BeastwithFriends on November 27, 2024, 01:24:25 am
That totally worked! Thank you all!