YesNoOk
avatar

throw problem (Read 421 times)

Started by Shinnox, March 10, 2008, 03:00:33 am
Share this topic:
throw problem
#1  March 10, 2008, 03:00:33 am
  • avatar
  • ***
ive always hated doin throws.

im doing just a basic throw, and im getting a strange anim glitch.

if i throw p2 from the normal p1 side, the animation (thats, player 2 getting thrown anim) plays just fine.
but if i do it from the opposite side, one of the sprites appears way behind p1.

heres a vid of it. it shows it in slow motion. the first is how it should look, as done from p1 side. and the second is done from p2 side, and the bug  happens.
http://www.youtube.com/watch?v=EIiQmfC4QLo

heres the code:
[mcode]
;--------------------------------------------------------------------
;throw
[Statedef 800]
type = S
movetype= A
physics = S
juggle = 0
velset = 0,0
ctrl = 0
anim = 800

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M
priority = 1, Miss
sparkno = -1
sprpriority = 1
p2facing = 1
p1stateno = 810
p2stateno = 820
fall = 1

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------
[Statedef 810]
type = S
movetype= A
physics = N
anim = 810
poweradd = 60

[State 810, SprPriority]
type = SprPriority
trigger1 = AnimElem =1
value = 1

[State 810, SprPriority]
type = SprPriority
trigger1 = AnimElem =2
value = 1

[State 810, SprPriority]
type = SprPriority
trigger1 = AnimElem =3
value = 1

[State 810, SprPriority]
type = SprPriority
trigger1 = AnimElem =4
value = 1



;------------------
[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 46, 0

[State 810, Bind 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 47, 0

[State 810, Bind 3]
type = TargetBind
trigger1 = AnimElem = 3
pos = 0, 3

[State 810, Bind 4]
type = TargetBind
trigger1 = AnimElem = 4
pos = -5, 47

[State 810, Bind 5]
type = TargetBind
trigger1 = AnimElem = 5
pos = -2, 27

[State 810, Bind 6]
type = TargetBind
trigger1 = AnimElem = 6
pos = -50, 0

[State 810, Bind 7]
type = TargetBind
trigger1 = AnimElem = 7
pos = -74, 21

[State 810, Bind 8]
type = TargetBind
trigger1 = AnimElem = 8
pos = -126, 15

[State 810, Bind 9]
type = TargetBind
trigger1 = AnimElem = 9
pos = -142, 22








[State 810, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 9
value = -78

[State 810, Throw]
type = TargetState
trigger1 = AnimElem = 9
value = 821

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------
[Statedef 820]
type = A
movetype = H
physics = N
velset = 0,0

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 820

;----------------------------------------------------------------------
[Statedef 821]
type = A
movetype = H
physics = N
velset = 0,0
poweradd = 40

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4


[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5110 ;Hit ground

[/mcode]



i think it has to do with:
[State 810, Bind 3]
type = TargetBind
trigger1 = AnimElem = 3
pos = 0, 3

im not too experienced with targetbinds, as ive only used it once.
Last Edit: March 10, 2008, 03:07:34 am by Ermac
Re: throw problem
#2  March 10, 2008, 05:05:32 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
If it is something like that, could be hitboxes. Try removing them from both characters, you don't need to be able to hit, or be hit during a throw so it's vaguely possible.

Always a good idea to specify time for a targetbind. It's also a good idea to allow p2 an out if the throw fails midway for any reason.


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.
Re: throw problem
#3  March 10, 2008, 07:47:44 am
  • avatar
  • ***
well, removing the boxes didnt help.

i removed the targetbid for the part that was messing up (elm 3) and now it works fine without any probs.

thanks for the suggestions.
Re: throw problem
#4  March 10, 2008, 05:22:16 pm
  • ******
  • [E]
    • Mexico
the throws for player1 behave differently than the throws for player2 (actually the hwole code does), it's because mugen first check p1's code and then p2's code, so, try changing the code so it does not matter whose code is executed first. it might not be the case, but keep it in mind.