Need help creating a throw

Started by belphe89, May 30, 2020, 06:44:21 AM

Previous topic - Next topic

belphe89

Hello, I'm trying to create a grab for my character, I'm trying to use binds to accomplish this, I never created a working grab before, but it feels like I'm getting somewhere, But I just keep getting stuck. Am I on the right track, or am I doing something completely wrong?

The grab I'm trying to make looks like this;
Spoiler (click to show)

Thank you for your time.

Cyanide

Targetbind is how you would do that. You use a custom state when you hit to make sure p2 uses the right animation with changeanim2. Then you position him correctly on each frame of the throw with targetbind.


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.

Bane84

Spoiler (click to show)


;---------------------------------------------------------------------------
;Throw - Attempt
; CNS difficulty: medium-advanced
; Description: Throws are not difficult to make, although then can be
;     tedious at times. Throw attempt states have a HitDef of a
;     special format. The key parameters in a throw are p1stateno
;     and p2stateno. If the HitDef successfully connects, then
;     the attacker will change to the state number specified by
;     p1stateno, and the opponent will be change to the state
;     number assigned to p2stateno. The special thing about p2stateno
;     is that the opponent will be temporarily brought into the
;     attacker's state file. In this case, no matter who the
;     opponent is, he will be taken to state 820 of this file (kfm.cns)
;     and remain here until the end of the throw (look at his debug
;     information when he is being thrown; the text changes to yellow
;     to mean that he is in another player's state file).
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 3

; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents KFM from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 810       ;On success, KFM changes to state 810
p2stateno = 820       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

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

;---------------------------------------------------------------------------
;Throw - Throwing the opponent
; Description: In this state, KFM throws the opponent by binding him to
;     various offsets based on his current frame of animation. For
;     example, [State 810, Bind 1] binds the opponent to an offset of
;     28 pixels in front of KFM. That puts him around where KFM's hand
;     is at. Is is important to keep the opponent bound using a
;     TargetBind controller at all times, until you let him go. This
;     is especially important if your player has a Clsn2 box that
;     allows him to get hit while throwing someone. Each time a player
;     gets hit, all his bound targets will be set to a fall state. If
;     the opponent is not bound, then he may get stuck in his thrown
;     state when his attacker is knocked out of the throw halfway.
; Notes: There is a TargetLifeAdd controller to decrease the opponent's
;     life, and a TargetState controller to change his state to a
;     falling state when KFM lets go of him.
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 0
sprpriority = 3

[State 810, NoHit]
type = NotHitBy
trigger1 = 1
value = SCA

[State 810, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1, 1

[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 4
value = 800, 0

[State 810, NoPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(2) < 0
pos = 120, -120

[State 810, Bind 2]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
pos = 80, -480

[State 810, Bind 3]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
pos = 30, -540

[State 810, Bind 4]
type = TargetBind
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
pos = -30, -590

[State 810, Bind 5]
type = TargetBind
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
pos = -120, -520

[State 810, Bind 6]
type = TargetBind
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
pos = -180, -460

[State 810, Hurt 7]
type = TargetLifeAdd
trigger1 = AnimElem = 7
value = -80
kill = IfElse(var(5)!=0, 0, 1)

[State 810, PowerAdd]
type = TargetPowerAdd
trigger1 = AnimElem = 7
value = 40

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

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

;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by KFM's throw HitDef. The important thing here is to use a
;     ChangeAnim2 controller. The difference between ChangeAnim2 and
;     ChangeAnim is that ChangeAnim2 changes the player's animation to
;     an action in the AIR file of the attacker (in this case, kfm.air),
;     whereas ChangeAnim always changes the player to an action in his
;     own AIR file. Look at Action 820 in kfm.air for some extra
;     comments.
[Statedef 820]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 2

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

;In case attacker loses binding on player for any reason, this controller
;guarantees that the player will never get stuck in this thrown state.
[State 820, 2]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw - thrown into the air
; (a custom gethit state)
; Description: This state has the opponent flying through the air and
;     falling down onto the ground. The SelfState controller sets the
;     opponent back using to his own state file when he his the ground.
;     Controllers 821,2 and 821,3 allow the opponent to recover by
;     hitting his recovery command when he is falling.
[Statedef 821]
type    = A
movetype= H
physics = N
velset = 11.2,-28
poweradd = 40
sprpriority = 2

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

[State 821, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -80
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 821, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

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


Code should be self explanatory.  State 800 is the player state where they attempt to grab the character.  On successful contact, player goes to state 810 (attack state) where they throw the character (via TargetBind as Cyanide said) while target goes to state 820 (gethit state) where the character sets the thrown animation (via ChangeAnim2 as Cyanide said).  After the target binding is released, the opponent is forced to state 821.

belphe89

#3
Ah! thank you so much! the throw state wasn't working right either, I got it to work like it should. (I'm still figuring out the animation though) But the throw I was talking about is one of her specials which involved a throw, I should have worded that better, sorry. Could I still be able to use targetbind for her specials, or is that only for the throw states?


Odb718

Targetbinds in a special move are fine. Usually if you're only doing 1 or 2 positions you can use Snap in the hitdef or another way to do it. If it's more complex, I personally tend to "trick" myself into thinking the special move is a type of throw. Helps me code it easier/better.
Usually you want a custom state for P2 if they're in a series of targetbinds.
vVv Gouken718 vVv SabreTooth718 vVv


belphe89

@Odb718 Hi! I'm trying to do what you're suggesting but for some reason the binds aren't working, strangely it's only working for state 810 because i got the throw to work like it should there, but I think the problem might be the trigger.

Heres the code I have so far for it if you want to see V
Spoiler (click to show)


;---------------------------------------------------------------------------
; terrible tail
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 410

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA ;Attribute: Standing, Normal Attack
damage = 23, 0 ;Damage that move inflicts, guard damage
animtype = Light ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA ;Flags on how move is to be guarded against
hitflag = MAF ;Flags of conditions that move can hit
priority = 3, Hit
p1stateno = 411 ;Attack priority: 0 (least) to 7 (most), 4 default
p2stateno = 412
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 8, 8 ;Time attacker pauses, time opponent shakes
sparkno = 0 ;Spark anim no (Def: set above)
sparkxy = -10, -76 ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = 5, 0 ;Sound to play on hit
guardsound = 6, 0 ;Sound to play on guard
ground.type = High ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5 ;Time that the opponent slides back
ground.hittime  = 12 ;Time opponent is in hit state
ground.velocity = -4 ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8 ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3 ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12 ;Time before opponent regains control in air

[State 5000, Voice]
type = PlaySnd
trigger1 = time = 0
value = 30,3
volume = 225
channel = 0

[State 5000, Voice]
type = PlaySnd
trigger1 = time = 35
value = 30,4
volume = 225
channel = 0

[State 0, TargetState]
type = TargetState
trigger1 = animtime = 0
value = 412
ID = -1
;ignorehitpause =
;persistent =

[State 410, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;-----------------------------------
; Terrible tail success
[Statedef 411]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 411

[State 412, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(1) < 0
pos = -73, -64

[State 412, Bind 2]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
pos = 80, 2

[State 410, Bind 3]
type = TargetBind
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(5) < 0
pos = -180, 0

[State 5000, Voice]
type = PlaySnd
trigger1 = time = 10
value = 30,4
volume = 225
channel = 0

[State 410, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;--------------------------
;Grab animation
[Statedef 412]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 5030

[State 412, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


This is what I'm trying to make it look like V
Spoiler (click to show)

Thank you so much for the help.

Odb718

Try adding
hitdefpersist = 1
to the Statedef 411.

I would also change your targetstate to this.
[State 0, TargetState]
type = TargetState
Triggerall = NumTarget
trigger1 = movehit
value = 412
ignorehitpause = 1

If your character is playing 2v2 the -1 ID can mess things up. Your character isn't going to hit P2 when time = 0. You only want the character to change positions once the move hits.
vVv Gouken718 vVv SabreTooth718 vVv


Cyanide

Nah. Issue is the custom state itself. Hes using p2stateno in the hitdef so thats in play. But its just anim = 5030 in the custom state and a simple out when animtime = 0. Need to fix that up. Use a custom anim and only allow out when not isbound or code an extra release state


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.

belphe89

@Cyanide (Sorry for the late reply) I've managed to make the binds work like they should. But I'm  I'm kinda confused on allow out when not inbound, I only know how to use bound, But I'm kinda confused on when I should use an out.

Here's the updated code if you need it.
Spoiler (click to show)
;-----------------------------------
; Terrible tail success
[Statedef 411]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 411

[State 412, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(1) < 0
pos = -73, -64

[State 412, Bind 2]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
pos = 15, -82

[State 410, Bind 3]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(5) < 0
pos = -90, 0

[State 5000, Voice]
type = PlaySnd
trigger1 = time = 10
value = 30,4
volume = 225
channel = 0

[State 410, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;--------------------------
;Grab animation
[Statedef 412]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 412

[State 820, 2]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 820

[State 412, 5]
type = ChangeState
trigger1 = Time = 10
value = 0
ctrl = 1

I'd have to thank you again for helping me out with this. it feels like I'm close to getting it done.

Cyanide

In your cystom state remove the changestate.

Selfstate should always send you to a standard state. So unless 820 is a requirement to continue (in which case you want changestate) you Selfstate to 5050 or 0 with 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.

belphe89

Thank you so much! I really appreciate your help! I got it to functionally work but, I still have a few problems though, I think I should list the rest of my problems here because I think this thread is going way too long. ^^;

1. The custom states seem to only work with my character, I tested it with other characters and it doesn't work on them.

2. Is there any way for me to apply important sprites to an animation (like for example, making the character pinned to the ground using sprite 5040, 10).

3. When the enemy is grabbed they bounce, I think this might be because the value of its gethitvar is set to 5050.

4. The enemy doesn't bind to the tail, it only binds correctly if I'm aligned just right, like if I'm too close they bind near my characters face.



Cyanide



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.

Odb718

For #4, you should be able to use Snap inside the original hitdef to help get rid of that problem.
For #2, make sure youre using he right ChangeAnim method in your custom state for P2.
https://mugenguild.com/forum/topics/changeanim-and-changeanim2-sctrl-169930.0.html

belphe89, for things like #1, you got to realize how many different options you've given us to try and figure out.
The way you stated it, sounds like, "P2 wont enter my custom states" But we've got no clue How/Why it doesn't work with the other characters. We need a lot more info to go on.

#3 is odd. If it's only working with your character, we should fix #1 first, then see if other characters are getting the same reactions.
vVv Gouken718 vVv SabreTooth718 vVv


belphe89

@Cyanide

Here you go.

Spoiler (click to show)
;---------------------------------------------------------------------------
; terrible tail
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 410

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA ;Attribute: Standing, Normal Attack
damage = 23, 0 ;Damage that move inflicts, guard damage
animtype = Light ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA ;Flags on how move is to be guarded against
hitflag = MAF ;Flags of conditions that move can hit
priority = 3, Hit
p1stateno = 411 ;Attack priority: 0 (least) to 7 (most), 4 default
p2stateno = 412
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 8, 8 ;Time attacker pauses, time opponent shakes
sparkno = 0 ;Spark anim no (Def: set above)
sparkxy = -10, -76 ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = 5, 0 ;Sound to play on hit
guardsound = 6, 0 ;Sound to play on guard
ground.type = High ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5 ;Time that the opponent slides back
ground.hittime  = 12 ;Time opponent is in hit state
ground.velocity = -4 ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8 ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3 ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12 ;Time before opponent regains control in air

[State 5000, Voice]
type = PlaySnd
trigger1 = time = 0
value = 30,3
volume = 225
channel = 0

[State 5000, Voice]
type = PlaySnd
trigger1 = time = 35
value = 30,4
volume = 225
channel = 0

[State 0, TargetState]
type = TargetState
trigger1 = animtime = 0
value = 412
ID = -1
;ignorehitpause =
;persistent =

[State 410, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;-----------------------------------
; Terrible tail success
[Statedef 411]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 411

[State 412, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(1) < 0
pos = -73, -64

[State 412, Bind 2]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
pos = 15, -82

[State 410, Bind 3]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(21) < 0
pos = -60, 0

[State 5000, Voice]
type = PlaySnd
trigger1 = time = 10
value = 30,4
volume = 225
channel = 0

[State 410, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;--------------------------
;Grab animation

[Statedef 412]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 412

[State 820, 2]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

Cyanide

You're STILL not using changeanim2 in the custom state 412. That lets you assign required sprites to create the hit anim you want. Only use required sprites or your opponent will vanish. Use changeanim2 instead of anim = 412

Bindings all look good though.


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.

belphe89

#15
@Odb718 sorry about that... Wired, I just tested it out with other characters and they're being affected by the custom states now, I dunno what I added that fixed it...but, there we go... the issue was that if I used the attack on anyone but Megaira, they just stood there, but it seemed to have been fixed somehow...

And yes, other characters are getting the same reactions.

belphe89

#16
@Cyanide Sorry about that, I'm not sure why I didn't put a changeanim2 state like you said. ^^;
I also have to apologize for taking so long to reply... hopefully I can put a good conclusion to this thread.

I'm having a wired problem, the self state seems to be causing my character to bounce, not only that it also stops the changeanim2 from happening.

The selfstate allows the binds and changestate before it to execute, I think the problem might be with its value, but I'm not entirely sure.

Here's an updated version of the code.
Spoiler (click to show)

;---------------------------------------------------------------------------
; terrible tail
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 410

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA ;Attribute: Standing, Normal Attack
damage = 23, 0 ;Damage that move inflicts, guard damage
animtype = Light ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA ;Flags on how move is to be guarded against
hitflag = MAF ;Flags of conditions that move can hit
priority = 3, Hit
p1stateno = 411 ;Attack priority: 0 (least) to 7 (most), 4 default
p2stateno = 412
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 8, 8 ;Time attacker pauses, time opponent shakes
sparkno = 0 ;Spark anim no (Def: set above)
sparkxy = -10, -76 ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = 5, 0 ;Sound to play on hit
guardsound = 6, 0 ;Sound to play on guard
ground.type = High ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5 ;Time that the opponent slides back
ground.hittime  = 12 ;Time opponent is in hit state
ground.velocity = -4 ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8 ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3 ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12 ;Time before opponent regains control in air
snap = 73, -64

[State 5000, Voice]
type = PlaySnd
trigger1 = time = 0
value = 30,3
volume = 225
channel = 0

[State 5000, Voice]
type = PlaySnd
trigger1 = time = 35
value = 30,4
volume = 225
channel = 0

[State 0, TargetState]
type = TargetState
trigger1 = animtime = 0
value = 412
ID = -1
;ignorehitpause =
;persistent =

[State 410, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;-----------------------------------
; Terrible tail success
[Statedef 411]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 411

[State 412, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(1) < 0
pos = -73, -64

[State 412, Bind 2]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
pos = 15, -82

[State 410, Bind 3]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(21) < 0
pos = -60, 0

[State 5000, Voice]
type = PlaySnd
trigger1 = time = 10
value = 30,4
volume = 225
channel = 0

[State 410, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;--------------------------
;Grab animation
[Statedef 412]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 412

[State 820, 2]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

;---------------------------------------------------------------------------

Cyanide

Your first targetbind is bad. You want less than animelem 2. Less than 1 means before the state starts. So you're dropping the bind allowing p2 out then recapturing it because hes still a target.


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.

belphe89

@Cyanide Yay! I got the bouncing to stop! Now the only problem I have left is when I use the attack the animation doesn't play, But when I test out the code without the selfstate the animation actually plays but the binds don't work. if I can get that figured out I'm all done.

Here's what I have now;

Spoiler (click to show)
;---------------------------------------------------------------------------
; terrible tail
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 410

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA ;Attribute: Standing, Normal Attack
damage = 23, 0 ;Damage that move inflicts, guard damage
animtype = Light ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA ;Flags on how move is to be guarded against
hitflag = MAF ;Flags of conditions that move can hit
priority = 3, Hit
p1stateno = 411 ;Attack priority: 0 (least) to 7 (most), 4 default
p2stateno = 412
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 8, 8 ;Time attacker pauses, time opponent shakes
sparkno = 0 ;Spark anim no (Def: set above)
sparkxy = -10, -76 ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = 5, 0 ;Sound to play on hit
guardsound = 6, 0 ;Sound to play on guard
ground.type = High ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5 ;Time that the opponent slides back
ground.hittime  = 12 ;Time opponent is in hit state
ground.velocity = -4 ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8 ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3 ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12 ;Time before opponent regains control in air
snap = 73, -64

[State 5000, Voice]
type = PlaySnd
trigger1 = time = 0
value = 30,3
volume = 225
channel = 0

[State 5000, Voice]
type = PlaySnd
trigger1 = time = 35
value = 30,4
volume = 225
channel = 0

[State 0, TargetState]
type = TargetState
trigger1 = animtime = 0
value = 412
ID = -1
;ignorehitpause =
;persistent =

[State 410, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;-----------------------------------
; Terrible tail success
[Statedef 411]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 411

[State 412, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(0) >= 0 && AnimElemTime(1) < 0
pos = -73, -64

[State 412, Bind 2]
type = TargetBind
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
pos = 70, -10

[State 412, Bind 2]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
pos = 15, -82

[State 410, Bind 3]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(19) < 0
pos = -60, 0

[State 5000, Voice]
type = PlaySnd
trigger1 = time = 10
value = 30,4
volume = 225
channel = 0

[State 410, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;--------------------------
;Grab animation
[Statedef 412]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 412

[State 820, 2]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

;---------------------------------------------------------------------------