Issue with TargetBind?

Started by Ricepigeon, February 21, 2013, 06:24:36 AM

Previous topic - Next topic

Ricepigeon

Alright so, I'm trying to code in an air throw that hits grounded opponents. One issue I'm having though is the TargetBind controller, which doesn't seem to be having any effect.

Player's state
Quote
;---------------------------------------------------------------------------
; Flip - Throw
[Statedef 1604]
type    = A
movetype = A
physics = N
ctrl = 0
anim = 1604
sprpriority = 1

[State 1604, Grav]
type = veladd
trigger1 = time
y = 0.5

[State 800, AttackDist]
type = AttackDist
trigger1 = 1
value = 0

[State 210, PSND]
type = playsnd
trigger1 = animelemtime(3) = 0
value = 210,0
channel = 0

[State 220, 1]
type = PlaySnd
trigger1 = animelemtime(3) = 0
value = 0, 1

[State 1604, HD]
type = hitdef
trigger1 = var(6) > 0
trigger1 = movecontact = 0
trigger1 = p2movetype != H
attr = A, ST
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = -1
p2facing = 1
p1stateno = 1605
id = 1605
fall = 1

[State 1602, Recovery Frames]
type = statetypeset
trigger1 = animelemtime(4) = 0
movetype = I
ignorehitpause = 1

[State -2, reset ypos]
type = posset
trigger1 = vel y > 0
trigger1 = pos y >= -vel y
y = 0

[State -2, reset ypos]
type = changestate
trigger1 = vel y > 0
trigger1 = pos y >= -vel y
value = 52

;---------------------------------------------------------------------------
; Flip - Throw Success
[Statedef 1605]
type    = A
movetype = A
physics = N
ctrl = 0
anim = 1605
sprpriority = 1

[State 1605, ASS]
type = assertspecial
trigger1 = 1
flag = noautoturn
ignorehitpause = 1

[State 1605, HSND]
type = playsnd
trigger1 = time = 0
value = 1,0

[State 1605, VS]
type = velset
trigger1 = time = 0
x = 0
y = 0

[State 1605, Throw State]
type = targetstate
trigger1 = numtarget(1605)
trigger1 = time = 0
value = 1650

[State 1320, width]
type = width
trigger1 = 1
edge = 30, 0

[State 1605, Bind]
type = bindtotarget
trigger1 = animelemtime(1) >= 0
trigger1 = animelemtime(3) < 0
id = 1605
pos = 0,29,head

[State 1605, Bind 2]
type = targetbind
trigger1 = animelemtime(3) >= 0
trigger1 = animelemtime(4) < 0
time = 1
id = 1605
pos = -56.0,-80.0

Enemy State
Quote
;------------------------------------------
; Flip Grabbed
[Statedef 1650]
type = A
movetype = H
physics = N
ctrl = 0
sprpriority = 0

[State 1650, CA]
type = changeanim2
trigger1 = time = 0
value = 1650

The bindtotarget controller works as expected, with p2 still on the ground. However, once the third animation element kicks in, the binding won't apply and p2 will still be stuck at his original axis. Thinking it might have been the bindtotarget controller causing the issue I temporarily disabled it, yet the problem persists.

Cyanide

if that's all the code in 1650 i see no out for him.

All i can think of right now is to change triggers round, do something like trigger1 = 1 and see if it's working at all on the binding, or if he's dropping out regardless of what you've written. If that's the case you have something a bit odd going on.


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.

BladeStorm_X

try using time trigger instead of animelemtime, see if that works

Infinite Daze

I think I had a similar issue, have you tried moving the id in the hitdef higher up in the hitdef? I usually now only put the id in the hitdef no lower than the hitflag because I noticed sometime the flag would not register.

Ricepigeon

Found out what the issue was. The throwing anim didn't have a 4th animation element because I forgot to save the air file. Silly me.

Problem solved.