News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

P2Dist x bug in 1.0?

Started by Jmorphman, June 25, 2010, 12:12:38 PM

Previous topic - Next topic

Jmorphman

I recently noticed a weird bug in my Joe, but only in MUGEN 1.0: when performing a Golden Tiger Kick on a blocking opponent, the Golden Tiger Kick FX updates a few ticks before the hitpause ends, resulting in the FX finishing before the move is finished. I have the explods for the FX set on "ignoreHitPause = 0", and this works for WinMUGEN, but not MUGEN 1.0. Is this a bug in 1.0 or I am just doing something wrong?

2OS

Clearly you're doing nothing wrong, I blame 1.0, and small errors like that + the many errors it has is why I haven't touched it yet, unstable POS, having to ""convert"" a character with things other than new features like victory quotes is goddam retarded, but of course, respectfully, opinions will vary

Cyanide

I've just checked this in 1.0 and am seeing nothing wrong.

Explod has 3 ticks of time per frame
ignorehitpause  = 0
pausetime of 15.

I get 15 ticks of one frame, then 2 ticks, then it changes.

Post code maybe? Perhaps there's something i'm missing and don't have the same set up as you. Or you've put a setting somewhere you aren't expecting to have an effect.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Jmorphman

[State 3200, Golden Tiger Kick FX (Bottom)]
type = Explod
trigger1 = AnimElem = 6
anim = 3205
sprPriority = 1
pos = 56,-93
posType = P1
bindTime = 12
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

Cyanide

Erm, + hitdef and air data for both animations?


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Jmorphman

Oh, right. Sorry.

Spoiler (click to show)
;Golden Tiger Kick
[Begin Action 3200]
Clsn2: 2
  Clsn2[0] = -22, -85, 27, 2
  Clsn2[1] = -8, -99, 20, -84
10,0, 0,0, 3
Clsn2: 2
  Clsn2[0] = 22, -63, 49, -33
  Clsn2[1] = -21, -56, 37, 5
1200,0, 0,0, 51
Clsn2: 2
  Clsn2[0] = 26, -75, 55, -42
  Clsn2[1] = -21, -68, 40, 1
1200,1, 0,0, 2
Clsn2: 2
  Clsn2[0] = 12, -101, 55, -73
  Clsn2[1] = -13, -88, 36, 0
1200,2, 0,0, 2
Clsn1: 1
  Clsn1[0] = 16, -74, 52, -38
Clsn2: 3
  Clsn2[0] = 15, -75, 53, -37
  Clsn2[1] = -16, -95, 22, 0
  Clsn2[2] = -9, -110, 15, -94
1200,3, 0,0, 2
Clsn1: 1
  Clsn1[0] = -23, -110, 60, -67
Clsn2: 2
  Clsn2[0] = 3, -67, 39, -6
  Clsn2[1] = -24, -111, 61, -66
1200,4, 0,0, 2
Clsn1: 1
  Clsn1[0] = -20, -113, 62, -65
Clsn2: 2
  Clsn2[0] = -21, -114, 63, -64
  Clsn2[1] = 3, -64, 42, -6
1200,5, 0,0, 10
Clsn2: 3
  Clsn2[0] = 20, -73, 51, -35
  Clsn2[1] = -9, -110, 15, -94
  Clsn2[2] = -17, -95, 21, 0
1200,3, 0,0, 2
Clsn2: 2
  Clsn2[0] = -14, -94, 33, -2
  Clsn2[1] = -1, -109, 21, -93
1200,6, 0,0, 1
Clsn2: 2
  Clsn2[0] = -4, -79, 24, -67
  Clsn2[1] = -24, -67, 26, 2
10,1, 0,0, 14
Clsn2: 2
  Clsn2[0] = -22, -85, 27, 2
  Clsn2[1] = -8, -99, 20, -84
10,0, 0,0, 3


;Golden Tiger Kick FX
[Begin Action 3205]
3205,0, 0,0, 2,, AS128D256
3205,1, 0,0, 2,, AS128D256
3205,2, 0,0, 2,, AS128D256
3205,3, 0,0, 2,, AS128D256
3205,4, 0,0, 2,, AS128D256
3205,5, 0,0, 2,, AS128D256
3205,6, 0,0, 2,, AS128D256
3205,7, 0,0, 2,, AS128D256
3205,8, 0,0, 2,, AS128D256
3205,9, 0,0, 2,, AS128D256



[State 3200, Golden Tiger Kick FX (Bottom)]
type = Explod
trigger1 = AnimElem = 6
anim = 3205
sprPriority = 1
pos = 56,-93
posType = P1
bindTime = 12
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 3200, Golden Tiger Kick FX (Top)]
type = Explod
trigger1 = AnimElem = 6
anim = 3205
sprPriority = 3
pos = 56,-93
posType = P1
bindTime = 12
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1
removeOnGetHit = 1
ignoreHitPause = 0

[State 3200, Hit 1]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 5
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 25 < 7, 7, fvar(11) * 25)), 7
getPower = 0,0
givePower = 36, 36
pauseTime = 4, 4
guard.pauseTime = 4, 4
animType = Back
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -1, -8.81
ground.cornerPush.velOff = 0
guard.velocity = -12.64
guard.cornerPush.velOff = 0
air.velocity = -1, -12.81
air.cornerPush.velOff = 0
yAccel = 0.5
fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 40), var(36) := -60
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd= -255, -255, -255, 48
envShake.time = 18
envShake.ampl = 6
envShake.freq = 120

[State 3200, Hit 2]
type = HitDef
trigger1 = !var(16) && var(15) < 9
trigger1 = AnimElemTime(6) >= 0
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 22 < 7, 7, fvar(11) * 22)), 7
getPower = 0,0
givePower = 36, 36
pauseTime = 6, 6
guard.pauseTime = 6, 6
animType = Back
air.animType = Back
fall.animType = Back
ground.type = Low
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -1, -8.81
ground.cornerPush.velOff = 0
guard.velocity = -12.64
guard.cornerPush.velOff = 0
air.velocity = -4, -7;-12.81
air.cornerPush.velOff = 0
yAccel = 0.5
fall = 1
fall.recover = 1
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8014)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 135), var(36) := -85
palFX.time = 38
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envShake.time = 18
envShake.ampl = 6
envShake.freq = 120


Cyanide

Your spark is 10 ticks long. You have 12 ticks between the point where it is created and where your attack animation appears to finish. You have specified no removetime on the effect. It's hitting, being paused, and then continuing. It's total time according to what i'm reading there is less than the animation you want it to appear/finish with.

QuoteClsn2: 2
  Clsn2[0] = 3, -67, 39, -6
  Clsn2[1] = -24, -111, 61, -66
1200,4, 0,0, 2
Clsn1: 1
  Clsn1[0] = -20, -113, 62, -65
Clsn2: 2
  Clsn2[0] = -21, -114, 63, -64
  Clsn2[1] = 3, -64, 42, -6
1200,5, 0,0, 10
This makes sense right now, how many ticks early does it actually end? 2 ticks from the end of animelem 7 or more than that?


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Jmorphman

Quote from: Cyanide on June 26, 2010, 05:07:43 AM
Your spark is 10 ticks long.
Err, what? It's 20 ticks long. It should stay bound to Joe for 12 ticks, then fade away over the next 8 ticks.

Quote from: Cyanide on June 26, 2010, 05:07:43 AM
This makes sense right now, how many ticks early does it actually end? 2 ticks from the end of animelem 7 or more than that?
It becomes unbound from Joe 6 ticks before the end of AnimElem 7, rather than staying bound to him until he reaches AnimElem 8; its animation is finished 2 ticks from the end of AnimElem 7.

Cyanide

Whoops sorry. And yes, that sounds broken.

The unbind should definitely not be doing that. But this didn't break for me. Could you try a complete test attack with one hit and displaying that spark?

I don't know if there's a method of fixing, but if we can tell Elecbyte where the problem is and how to replicate we can log a report.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

2OS

I'm stuck on why ignorehitpause=0 doesn't work for the new and ""improved"" engine

Cyanide

Worked fine in kirby. And i haven't noticed it break anywhere else. The pause happens on a 3 tick long frame of explod, it's paused for the full 4 ticks, then continues for 2 and moves onto  the next frame.

The biggest difference between my code and his is that i haven't specified guard.pausetime.

Hence i'd like to pin it down to say where the bug actually is. They may as well fix it. Or we'll find out what's broken it.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Jmorphman

Quote from: Cyanide on June 27, 2010, 12:10:01 AM
Could you try a complete test attack with one hit and displaying that spark?
I just used the standing far light punch state, using the same animation as Golden Tiger Kick, and had the explod appear like normal. It hit once, and if blocked, the explod unbinds 1 tick earlier than it should.

Cyanide

Agreed, i can replicate that.

RC 1 contained

Quote
CNS: Fixed: HitDef P1 pausetimes expired 1 tick sooner than specified. When loading 2002.04.14 and older characters, this fix will be compensated for by subtracting 1 from the P1 pausetime after expression evaluation.

as a fix. I wonder if the effect is bugging out here. Does the 1 tick loss map in with how many hits you deal? Like 6 hits = 6 tick bindtime loss?


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Jmorphman

Quote from: Cyanide on June 27, 2010, 04:11:07 AM
Does the 1 tick loss map in with how many hits you deal? Like 6 hits = 6 tick bindtime loss?
Yep.

Cyanide

#14
Ok, have reported it as a bug. I don't think there's much more we can do although you could possibly work around it by using a -1 bind and destroying/creating a new one when it should lose binding.

Edit: Elecbyte have tested and confirmed. Hope it's a next version fix.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Jmorphman

Quote from: Cyanide on June 27, 2010, 05:47:35 AM
Edit: Elecbyte have tested and confirmed. Hope it's a next version fix.
That's good to hear; however, I have a new problem, this time involving my current project, Chun-Li, specifically in EX Spinning Bird Kick. The EX version has Chun-Li remain stationary, and any opponents who are hit by the move are "sucked in" for more hits, much like Ryu's Shinku Tatsumaki Senpukyaku. This move hits five times, and the fifth hit sends the opponent into a falling state. The problem is that on the third hit (the third time an opponent is hit by this specific attack, just to be clear), the wrong get hit animation plays. Every hitdef has the ground.type specified as "High", but whenever an opponent is hit for a third time, the get hit animation that plays is "Low".



I believe this has something to do with the fact that I have PlayerPush turn off when the opponent is is hit by the move, along with how I have the opponent's ground.velocity set as they are hit. When the opponent is in front of Chun-Li, their velocity is set at 20,0; when they are behind, their velocity is set as -20,0. This makes it so that when an opponent is hit, they are sent to the opposite side of Chun-Li that they were on (wow, that is an absolutely terrible explanation). Anyway, this only happens when the opponent's velocity takes them behind Chun-Li, even if they are hit the third time when they are currently in front of her (basically it doesn't matter where the opponent is relative to Chun-Li; the third hit will always make them play a "Low" get hit animation). In addition, if the opponent is hit all five times, the fifth time they are hit, they behave differently than the other four times. For the first four hits, the opponent immediately faces Chun-Li as soon as they are hit; however, for the fifth hit, they remain facing the direction they were in. This only happens when I have "fall = 1" on; it behaves normally if the opponent is not sent into a falling state. For example, if Chun-Li is facing right, and the opponent is in front of her and is hit the full five times, they will be sent flying off towards the right, while still facing right, which looks wrong..

I've tested this on both WinMUGEN and MUGEN 1.0, with the results being the same. I'm not really sure what to do here to fix these two things, besides putting the opponent in a custom state.  :(


anim for the attack
Spoiler (click to show)


;EX Spinning Bird Kick
[Begin Action 1230]
Clsn2: 2
  Clsn2[0] = -24, -92, 19, -46
  Clsn2[1] = -28, -46, 40, 2
1200,0, 0,0, 1
Clsn2: 2
  Clsn2[0] = -36, -78, 26, -39
  Clsn2[1] = -30, -39, 46, 2
1200,1, 0,0, 1
Clsn2: 2
  Clsn2[0] = -41, -77, 16, -33
  Clsn2[1] = -45, -33, 39, 2
1200,2, 0,0, 2
Clsn2: 3
  Clsn2[0] = -31, -84, -17, -60
  Clsn2[1] = -44, -60, 15, -28
  Clsn2[2] = -52, -28, 28, 2
1200,3, 0,0, 1
Clsn2: 2
  Clsn2[0] = -36, -64, 24, -40
  Clsn2[1] = -49, -40, 38, 0
1200,4, 0,0, 1
Clsn2: 3
  Clsn2[0] = -10, -69, 18, -1
  Clsn2[1] = -58, -66, -10, -38
  Clsn2[2] = 18, -67, 38, -30
1200,5, 0,0, 1
Clsn2: 3
  Clsn2[0] = 7, -63, 32, -19
  Clsn2[1] = -18, -73, 7, -1
  Clsn2[2] = -61, -66, -18, -40
1200,6, 0,0, 1
Clsn2: 4
  Clsn2[0] = -44, -67, -20, -48
  Clsn2[1] = 4, -55, 43, -30
  Clsn2[2] = -20, -75, 4, -3
  Clsn2[3] = 4, -92, 56, -60
1200,7, 0,0, 1
Clsn1: 1
  Clsn1[0] = -55, -96, 70, -66
Clsn2: 2
  Clsn2[0] = -26, -65, 14, -31
  Clsn2[1] = -56, -97, 71, -65
1200,8, 0,0, 2
Clsn2: 2
  Clsn2[0] = -21, -69, 17, -29
  Clsn2[1] = -43, -93, 55, -69
1200,9, 0,0, 1
Clsn2: 2
  Clsn2[0] = -23, -69, 10, -29
  Clsn2[1] = -19, -93, 21, -69
1200,10, 0,0, 1
Clsn2: 2
  Clsn2[0] = -18, -69, 20, -33
  Clsn2[1] = -28, -93, 35, -69
1200,11, 0,0, 1
Clsn2: 3
  Clsn2[0] = -23, -69, 10, -33
  Clsn2[1] = -45, -93, 60, -69
  Clsn2[2] = 10, -69, 36, -45
1200,12, 0,0, 1
Clsn1: 1
  Clsn1[0] = -55, -96, 70, -66
Clsn2: 2
  Clsn2[0] = -18, -65, 28, -32
  Clsn2[1] = -56, -97, 71, -65
1200,13, 0,0, 2
Clsn2: 2
  Clsn2[0] = -13, -69, 18, -30
  Clsn2[1] = -20, -93, 23, -69
1200,14, 0,0, 2
Clsn2: 2
  Clsn2[0] = -17, -69, 17, -30
  Clsn2[1] = -34, -93, 44, -69
1200,15, 0,0, 2
Clsn1: 1
  Clsn1[0] = -55, -96, 70, -66
Clsn2: 2
  Clsn2[0] = -26, -65, 14, -31
  Clsn2[1] = -56, -97, 71, -65
1200,8, 0,0, 2
Clsn2: 2
  Clsn2[0] = -21, -69, 17, -29
  Clsn2[1] = -43, -93, 55, -69
1200,9, 0,0, 1
Clsn2: 2
  Clsn2[0] = -23, -69, 10, -29
  Clsn2[1] = -19, -93, 21, -69
1200,10, 0,0, 1
Clsn2: 2
  Clsn2[0] = -18, -69, 20, -33
  Clsn2[1] = -28, -93, 35, -69
1200,11, 0,0, 1
Clsn2: 3
  Clsn2[0] = -23, -69, 10, -33
  Clsn2[1] = -45, -93, 60, -69
  Clsn2[2] = 10, -69, 36, -45
1200,12, 0,0, 1
Clsn1: 1
  Clsn1[0] = -55, -96, 70, -66
Clsn2: 2
  Clsn2[0] = -18, -65, 28, -32
  Clsn2[1] = -56, -97, 71, -65
1200,13, 0,0, 2
Clsn2: 2
  Clsn2[0] = -13, -69, 18, -30
  Clsn2[1] = -20, -93, 23, -69
1200,14, 0,0, 2
Clsn2: 2
  Clsn2[0] = -17, -69, 17, -30
  Clsn2[1] = -34, -93, 44, -69
1200,15, 0,0, 2
Clsn1: 1
  Clsn1[0] = -55, -96, 70, -66
Clsn2: 2
  Clsn2[0] = -26, -65, 14, -31
  Clsn2[1] = -56, -97, 71, -65
1200,8, 0,0, 2
Clsn2: 2
  Clsn2[0] = -21, -69, 17, -29
  Clsn2[1] = -43, -93, 55, -69
1200,9, 0,0, 1
Clsn2: 3
  Clsn2[0] = 0, -78, 33, -44
  Clsn2[1] = 0, -96, 52, -78
  Clsn2[2] = -29, -88, 0, -11
1200,16, 0,0, 1
Clsn2: 3
  Clsn2[0] = -13, -94, 37, -49
  Clsn2[1] = -64, -95, -13, -76
  Clsn2[2] = -13, -49, 6, -11
1200,17, 0,0, 2
Clsn2: 3
  Clsn2[0] = -14, -99, 29, -62
  Clsn2[1] = -65, -95, -14, -63
  Clsn2[2] = -11, -62, 13, -19
1200,18, 0,0, 2
Clsn2: 3
  Clsn2[0] = -25, -99, 26, -70
  Clsn2[1] = -15, -70, 12, -16
  Clsn2[2] = -36, -70, -15, -45
1200,19, 0,0, 2
Clsn2: 2
  Clsn2[0] = -15, -99, 16, -55
  Clsn2[1] = -25, -55, 35, -16
1200,20, 0,0, 2
Clsn2: 3
  Clsn2[0] = -15, -85, 25, -42
  Clsn2[1] = -18, -42, 37, 1
  Clsn2[2] = -36, -77, -15, -62
1200,21, 0,0, 2
Clsn2: 1
  Clsn2[0] = -7, -53, 41, 2
3000,17, 0,0, 2
Clsn2: 1
  Clsn2[0] = -6, -57, 41, 2
3000,18, 0,0, 2
Clsn2: 2
  Clsn2[0] = -12, -72, 34, 2
  Clsn2[1] = 7, -90, 24, -72
210,6, 0,0, 1
Clsn2: 2
  Clsn2[0] = -7, -93, 11, -76
  Clsn2[1] = -21, -76, 33, 2
5,2, 0,0, 1

HitDef's and relevant code
Spoiler (click to show)
[State 1230, PlayerPush]
type = PlayerPush
trigger1 = MoveHit
value = 0

[State 1230, HitDef: Opponent In front]
type = HitDef
trigger1 = AnimElem = 9 || AnimElem = 14 || AnimElem = 17 || AnimElem = 22
trigger1 = !var(16) && (var(15) < 4 || var(20))
trigger1 = P2Dist x >= 0
ID = 1230
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
guard.pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
animType = Hard
air.animType = DiagUp
fall.animType = DiagUp
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = 20,0
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = 4.32, -7.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 61), var(36) := -80
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd= -255, -255, -255, 48
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120

[State 1230, HitDef: Opponent Behind]
type = HitDef
trigger1 = AnimElem = 9 || AnimElem = 14 || AnimElem = 17 || AnimElem = 22
trigger1 = !var(16) && (var(15) < 4 || var(20))
trigger1 = P2Dist x < 0
ID = 1231
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
guard.pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
animType = Hard
air.animType = DiagUp
fall.animType = DiagUp
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -20,0
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.32, -7.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 0
air.fall = 1
fall.recover = 0
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := -61), var(36) := -80
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd= -255, -255, -255, 48
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120

[State 1230, HitDef: Final Hit]
type = HitDef
trigger1 = AnimElem = 25
trigger1 = !var(16) && (var(15) < 5 || var(20))
ID = 1232
attr = S, SA
hitFlag = MAF
guardFlag = M
priority = 4, Hit
damage = ceil(ifElse(fvar(11) * 28 < 7, 7, fvar(11) * 28)), 7
getPower = ifElse(!var(13), 144, 72) * !var(20), 36 * !var(20)
givePower = 36, 36
pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
guard.pauseTime = ifElse(var(20), 6, 12), ifElse(var(20), 6, 12)
animType = DiagUp
air.animType = DiagUp
fall.animType = DiagUp
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 18
air.hitTime = 120
ground.velocity = -4.32, -7.49
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -4.32, -7.49
air.cornerPush.velOff = 0
yAccel = 0.58
fall = 1
fall.recover = 0
fall.recoverTime = 120
forceStand = 1
hitSound = -1 + 0 * (var(31) := 5)
guardSound = -1 + 0 * (var(32) := 0)
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 61), var(36) := -80
palFX.time = 12 * var(9)
palFX.add = 255, 255, 255
palFX.sinAdd= -255, -255, -255, 48
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120

[State 1230, TargetVelSet]
type = TargetVelSet
trigger1 = NumTarget(1230) && P2Dist x <= -30
trigger1 = Target(1230), StateType != A
trigger1 = Target(1230), StateNo != [5100,5150]
x = 0
ID = 1230

[State 1230, TargetVelSet]
type = TargetVelSet
trigger1 = NumTarget(1231) && P2Dist x >= 30
trigger1 = Target(1231), StateType != A
trigger1 = Target(1231), StateNo != [5100,5150]
x = 0
ID = 1231

Cyanide

That's more, mugen being clever. it was the same in standard winmugen iirc. Certain hits (like air to ground) would cause a different hit animation from things like being hit from above, or in this case, hit in the back of the head.

Alternating hitdefs and p2facing would be the order of the day here.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Jmorphman

Quote from: Cyanide on July 02, 2010, 12:20:48 AM
That's more, mugen being clever. it was the same in standard winmugen iirc. Certain hits (like air to ground) would cause a different hit animation from things like being hit from above, or in this case, hit in the back of the head.

Alternating hitdefs and p2facing would be the order of the day here.
Ah-ha! Thanks to your suggestion, I discovered that P.o.t.S.' code that makes the opponent face their attacker doesn't activate when the opponent is falling. So I made a quick addition:
Quote from: because you can't apply formatting to code[State -2, P2 Facing]
type = TargetFacing
trigger1 = MoveContact = 1 && NumTarget
trigger1 = !(Target, HitShakeOver) && !(Target, HitFall) && (Target, Time <= 1)
trigger2 = MoveContact = 1 && NumTarget(1232)
trigger2 = !(Target, HitShakeOver) && (Target, Time <= 1)

value = ifElse(P2Dist x >= 0, -1, 1)
ignoreHitPause = 1
which fixed that up.  :)

But I'm a little confused by your suggestion of "alternating hitdefs". Do you mean a HitDef for every frame with a Clsn1?

Cyanide

More like, one for p2 in front and one for p2 behind.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Jmorphman

Quote from: Cyanide on July 02, 2010, 12:58:22 AM
More like, one for p2 in front and one for p2 behind.
That's exactly what I did in the code I posted.