Jump to content
  • 0

Throw code bug


Risotto

Question

Hi people, here my trouble, when i launch my special move with B.I.G all doing well except during "throw" phase (3 phase : B.I.G jump, catch the opponent, punch then release him), the char float above the target as you can see in this pic :

 

notori10.jpg

 

Here the code for the move (in red the faulty one) : 

 

 

;B.I.G Grasp (jump)

[statedef 2006]

type = A

movetype= A

physics = N

velset = 4.5,-10

anim = 2006

 

[state 2006, 0]

type = HitOverride

trigger1 = time = 0

time = -1

attr = SCA, AA, AT, AP, NA, SA, HA, NT, ST, HT, NP, SP, HP

slot = 0

stateno = 2008

 

[state 2006, 2]

type = PlaySnd

trigger1 = time = 0

value = 1, 8

 

[state 2006, 3]

type = PlaySnd

trigger1 = time = 0

value = 11, 19

 

[state 2006, 7]

type = gravity

trigger1 = 1

 

[state 2006, 8]

type = hitdef

trigger1 = vel Y > 0

attr = A,HA

damage = 0

animtype = Hard

guardflag = MA

pausetime = 0,4

sparkxy = -10,-65

hitsound = S1,11

guardsound = S6,0

ground.type = High

ground.slidetime = 0

ground.hittime = 80

ground.velocity = 0, 0

air.velocity = -4

p2facing = 1

p1stateno = 2007

p2stateno = 2011

 

[state 2003, 6]

type = ChangeState

trigger1 = MoveGuarded

value = 2008

 

[state 2001, 1]

type = turn

trigger1 = MoveContact

 

[state 2001, 1]

type = turn

trigger1 = P2Dist X < 0 && MoveGuarded

 

[state 2003, 6]

type = ChangeState

trigger1 = vel y >= 9

value = 2009

 

;B.I.G Grasp (punch and tail)

 

[statedef 2007]

type = S

movetype = A

physics = S

velset = 0,0

anim = 2007

sprpriority = 3

ctrl = 0

 

[state 2007, 1]

type = TargetBind

trigger1 = Time = 0

pos = 15, 0

time = 66

 

[state 220, 1]

type = PlayerPush

trigger1 = time >=0

value = 1

 

[state 2007,2]

type = PosAdd

trigger1 = Time = 0

x = 26

y = -1

 

[state 2007, 3]

type = PlaySnd

trigger1 = AnimElem = 4

trigger2 = AnimElem = 7

trigger3 = AnimElem = 10

value = 1,4

 

[state 2007, 4]

type = PlaySnd

trigger1 = AnimElem = 10

value = 1,18

 

[state 2007, 5]

type = TargetLifeAdd

trigger1 = AnimElem = 4

trigger2 = AnimElem = 7

trigger3 = AnimElem = 10

value = -35

 

[state 801, 3]

type = TargetVelSet

trigger1 = Time = 82

x = -6

y = -5

 

[state 801, 4]

type = TargetState

trigger1 = Time = 82

value = 803

 

[state 801, 4]

type = TargetState

trigger1 = AnimElem = 12

value = 803

 

[state 2003, 6]

type = ChangeState

trigger1 = AnimElem = 12

value = 2008

 

;B.I.G Grasp (backflip)

 

[statedef 2008]

type = S

movetype= I

physics = N

anim = 2009

 

[state 220, 1]

type = PlayerPush

trigger1 = time >=0

value = 1

 

[state 2001, 1]

type = PosSet

trigger1 = time = 0

y = -14

 

[state 2001, 1]

type = HitOverride

trigger1 = time = 0

time = -1

attr = SCA, AA, AT, AP, NA, SA, HA, NT, ST, HT, NP, SP, HP

slot = 0

stateno = 2008

 

[state 2003, 6]

type = VelSet

trigger1 = Time = 0

x = -2.5

y = -10

 

[state 2220, 120]

type = VelAdd

trigger1 = Time >= 0

y = 0.45

 

[state 2003, 6]

type = VelSet

trigger1 = Pos Y >= 0

x = 0

y = 0

 

[state 2003, 6]

type = ChangeState

trigger1 = Pos Y >= 0

value = 2009

 

[statedef 2009]

type = S

movetype= A

physics = S

velset = 0,0

anim = 2010

 

[state 220, 1]

type = PlayerPush

trigger1 = time >=0

value = 1

 

[state 3009, 1]

type = PlaySnd

trigger1 = time = 0

value = 1, 9

 

[state 2001, 1]

type = HitOverride

trigger1 = time = 0

time = -1

attr = SCA, AA, AT, AP, NA, SA, HA, NT, ST, HT, NP, SP, HP

slot = 0

stateno = 5050

 

[state 2003, 6]

type = PosSet

trigger1 = Time = 0

y = 0

 

[state 2003, 6]

type = ChangeState

trigger1 = AnimTime = 0

value = 0

ctrl = 1

 

[statedef 2011]

type = A

movetype = H

physics = N

ctrl = 0

velset = 0, 0

 

[state 2011, 1]

type = NotHitBy

trigger1 = 1

value = SCA

 

[state 2011, 1]

type = PlayerPush

trigger1 = 1

value = 0

 

[state 2011, 2]

type = posset

trigger1 = 1

y= 0

 

[state 2011, selfstate]

type = changestate

trigger1 = time = 220

value = 11556

 

[state 11556, die]

type = SelfState

triggerall = life <= 0

trigger1 = 1

value = 5050

ctrl = 14

 

[state 802, 1]

type = ChangeAnim2

trigger1 = time = 0

value = 2011

 

[statedef 803]

type = A

movetype = H

physics = A

ctrl = 0

 

[state 803, 2]

type = NotHitBy

trigger1 = 1

value2 = SCA

time = 3

 

[state 803, 3]

type = SelfState

trigger1 = Pos Y >= -3

value = 5100

 

[state 803, 3]

type = SelfState

trigger1 = vel Y >= 9

value = 5100

 

By the way if i want to add sparks for the hit (punchs hit during the throw) were must i add the values in the code ? Sorry pals, my questions can seems ubernoobs ones, but i'm not a coder and i dont like ask help, but i have tried many unsuccessful manipulations...

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

In my opinion, throw issue in MUGEN is hard to check just by look at lines of MUGEN code, as from my experience throws need real-time MUGEN running debug process, i.e. switching debug messages of P1 and P2 in each frame of the P1&P2 movements.  Without actually getting to test your character in my MUGEN, I can only look for something unusual in your MUGEN code:

 

 

In StateDef 2007 (P1 throw state):

 

[state 2007, 1]

type = TargetBind

trigger1 = Time = 0

pos = 15, 0

time = 66

 

....

 

[state 801, 4]

type = TargetState

trigger1 = Time = 82

value = 803

 

[state 801, 4]

type = TargetState

trigger1 = AnimElem = 12

value = 803

 

** P1 binds P2 when Time = 0 then send P2 to a state (#803) when Time = 82 or AminElem = 12......hmmmmm.........what about when P1 Time = 1 to Time = 81?  I guess during P1 Time = 1 to Time = 81 P2 is the time when P2 floats unexpectedly.........

 

type = TargetBind

trigger1 = Time = 0

 

 

These two (2) lines of MUGEN code should be changed to something like this:

 

type = TargetBind

trigger1 = Time >= 0 && Time <= 81

 

 

In StateDef 2011(P2 get-thrown state):

 

[state 2011, selfstate]

type = changestate

trigger1 = time = 220

value = 11556

 

[state 11556, die]

type = SelfState

triggerall = life <= 0

trigger1 = 1

value = 5050

ctrl = 14

 

** when P2 is floating in the air, he/she/it may not ChangeState to #11556 until P2 Time = 220......

    and P2 SelfState to #5050 when P2 Life <= 0? 

    it doesn't make sense to me as StateDef 5050 is not the death state......and ctrl = 14 (mugen/docs/cns.html says ctrl = 0 or 1 only)???

    I think you don't really need to add a ctrl assignment here.......

    furthermore,  I think you should include a Trigger, !GetHitVar(isbound), by seeing P1 probably misses P2 binding during P1 Time = 1 to Time = 81...

Link to comment
Share on other sites

  • 0

Thx for your help ! However the trigger dont work properly...i put it under the first trigger of the 2007 state but B.I.G stay in mid air when punching. 

 

If i modify the two lines of code the p2 follow B.I.G until he land instead of falling on the ground, which is worse. 

Link to comment
Share on other sites

  • 0

Like I mentioned a while ago, MUGEN throws debug and test are hard to investigate by just looking at a few lines of code.  Which usually involves real-time monitoring for both P1 and P2

 

I once helped Toshio fix his Dot MUGEN WIP, as he trusted me and sent me his beta files: 

 

So, if you trust me then you might want to send the MUGEN character to me by PM, I will try to find a fix for you.  If you do so then please also state clearly what that throw does in details (drawing pictures help even more).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...