YesNoOk
avatar

Follow-up throw attack unable to hit opponent in custom state (Read 247 times)

Started by Continuity, November 29, 2009, 02:01:14 am
Share this topic:
Follow-up throw attack unable to hit opponent in custom state
#1  November 29, 2009, 02:01:14 am
  • ***
  • 我が名は 「ハクメン」、押して参る!
The basic concept for a throw attack that I made was to get p2 in a custom state that positions p2 within range for a follow-up attack by p1 when the throw is connected. Here's the basic code for this
[mcode];throw
[statedef 2000]
type=S
movetype=A
physics=S
ctrl=0
poweradd=0

[state 2000,1]
type=changeanim
trigger1=time=0
value=2000

[state 2000,hit]
type=hitdef
trigger1=time=0
attr=S, NT
priority = 1, miss
sparkno=-1
hitflag=-H
guardflag=M
p2stateno=2002

[state 2002]
type=changestate
trigger1=movecontact
ctrl=0
value=2001

[state 2000,2]
type=changestate
trigger1=animtime=0
ctrl=1
value=0

;follow-up attack
;throw hit
[statedef 2001]
type=S
movetype=I
physics=S
ctrl=0
poweradd=0
anim=2001

[state 1650]
type=hitdef
trigger1=time=0
attr = S, NA
damage = 35, 0
animtype = Heavy
hitflag = M
priority = 5, Hit
pausetime = 7, 7
sparkno = 0
sparkxy = -0, -0
hitsound = 5, 0
guardsound = 6, 0
ground.type = high
ground.slidetime = 23
ground.hittime  = 24
ground.velocity = -0.5,-2.6
guard.slidetime = 30
guard.velocity = -15
airguard.velocity = -2.5,-1.2
air.type = low
air.velocity = -2,-9
yaccel=0.6
air.hittime = 24
air.fall = 1
fall=1
ground.cornerpush.veloff=0
air.cornerpush.veloff=0

[state 2001]
type=changestate
trigger1=animtime=0
ctrl=1
value=0

;custom state for p2
;get thrown
[statedef 2002]
type=S
movetype=H
physics=S
ctrl=0
poweradd=0
sprpriority=999

[state 2002,1]
type=veladd
trigger1=time>7&&time<11
x=2

[state 2002,2]
type=changeanim2
trigger1=time=0
ctrl=0
value=2002[/mcode]

As you can see, I didn't write a changestate2 for the p2 custom state because I thought when p2 gets hit by the follow-up attack he'll just go to the state I'm looking for (lie down), but for some reason the follow-up attack won't hit even when the red clsn is on top of the blue one, like the picture shown below. Any advice? Thanks in advance

Last Edit: November 29, 2009, 03:07:49 am by Juggernaut117
Re: Follow-up throw attack unable to hit opponent in custom state
#2  November 29, 2009, 02:29:32 am
  • ******
Quote
[statedef 2001]
...
movetype=I
You can only hit if you have movetype = A. If you have anything else, all hitdefs will be completely ignored.
Part of the reason includes how Mugen detects that you can go to block state by pressing  back only if the opponent has movetype A. So if you don't have movetype A, the opponent can't even go to block state, and that's bad. So they made it so that if you don't have movetype A, you can't hit.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Last Edit: November 29, 2009, 02:33:20 am by Byakko
Re: Follow-up throw attack unable to hit opponent in custom state
#3  November 29, 2009, 03:07:30 am
  • ***
  • 我が名は 「ハクメン」、押して参る!
oh boy, can't believe I missed that, problem solved, big thanks