News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Throw code help!

Started by ネオン7, August 11, 2016, 07:27:07 PM

Previous topic - Next topic

ネオン7

I'm working on SNES Tournament Fighters Don & since yesterday, I haven't been able to properly code his throws from the game.

The template I'm using is from here: http://mugenguild.com/forum/topics/p-o-t-s-style-template-final-updated-6dec14-163702.0.html

Also, I've borrowed the throw codes from Kamekaze's version and used them for my version.

Have a look:
Spoiler (click to show)
;Kung Fu Throw - Attempt
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  =0;ifelse(var(8)=1,0,15); 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[State 800, 1]
type = HitDef
Trigger1 = p2stateno=4999
attr = S, NT         ;Attributes: Standing, Normal Throw
hitflag = MAF         ;Affect only ground people who are not being hit
priority = 2   ;Throw has low priority, must be miss or dodge type.
sparkno =-1
guard.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 = ifelse((command="holdfwd"&&AIlevel=0||enemy,backedgebodydist <70&&AIlevel>0),1,-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 
numhits=0

[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
guard.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 = ifelse((command="holdfwd"&&AIlevel=0||enemy,backedgebodydist <70&&AIlevel>0),1,-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             ;Force p2 into falling down

           ;Force p2 into falling down

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

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

;Kung Fu Throw - Throwing the opponent
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd=0; = 60
facep2=1
; Here a variable, var(2), is used to remember whether or not the
; player was holding forward at the start of the state. This variable
; is checked later on to turn KFM around if necessary.

[State 0, Explod]
type = Explod
trigger1 = numexplod(810)=0
anim = 10000
ID = 810
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
ignorehitpause=1
;ignorehitpause =
;trans =
;persistent =
;supermove = 0
;pausemove = 0

[State 640, 2]
type = PlaySnd
trigger1 = animelem=3
value =100+var(0), 0
channel = 0

[State 810, Width 2-11]
type = Width
trigger1 = time=0
edge = 60,50

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
pos = -30, 0
[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(3) < 0
pos = -35, -53
[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(4) < 0
pos = -2, -63
[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 4
pos = 85, -60

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElemtime(4) = 8
value = -ceil(166*fvar(1))

[State 0, PosAdd]
type = PosAdd
trigger1 =(frontedgebodydist <40||backedgebodydist<40)  &&time=0
x = -15

[State 0, TargetVelSet]
type = TargetVelSet
trigger1 = AnimElemtime(4) =8
x =2
y = -9
;ignorehitpause =
;persistent =
[State 810, Throw 11]
type = TargetState
trigger1 = AnimElemtime(4) = 8
value = 820


[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

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 820
[State 0, ScreenBound]
type = ScreenBound
trigger1 =1
value = 0
movecamera = 0,0
;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 = p2stateno!=810
value = 5050


;---------------------------------------------------------------------------
;Kung Fu Throw - Attempt
[Statedef 823]
type    = S
movetype= A
physics = S
juggle  =0;ifelse(var(8)=1,0,15); 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[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
guard.sparkno=-1
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = ifelse((command="holdfwd"&&AIlevel=0||enemy,backedgebodydist <70&&AIlevel>0),-1,1)
p2facing = 1          ;Force p2 to face KFM
p1stateno = 800      ;On success, KFM changes to state 810
p2stateno = 807      ;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
numhits=0
   [State 800, 1]
type = HitDef
Trigger1 = p2stateno=4999
attr = S, NT         ;Attributes: Standing, Normal Throw
hitflag = MAF         ;Affect only ground people who are not being hit
priority = 2   ;Throw has low priority, must be miss or dodge type.
sparkno =-1
guard.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 = ifelse((command="holdfwd"&&AIlevel=0||enemy,backedgebodydist <70&&AIlevel>0),-1,1)
p2facing = 1          ;Force p2 to face KFM
p1stateno = 823      ;On success, KFM changes to state 810
p2stateno = 807      ;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
numhits=0
[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 240

;---------------------------------------------------------------------------
;Kung Fu Throw - Throwing the opponent
[Statedef 840]
type    = S
movetype= A
physics = N
anim = 823
poweradd=0; = 60
facep2=1
; Here a variable, var(2), is used to remember whether or not the
; player was holding forward at the start of the state. This variable
; is checked later on to turn KFM around if necessary.
[State 0, PosAdd]
type = PosAdd
trigger1 =(frontedgebodydist <40||backedgebodydist<40) &&time=0
x = -15
[State 0, Explod]
type = Explod
trigger1 = numexplod(810)=0
anim = 10000
ID = 810
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
;ignorehitpause =
;trans =
;persistent =
;supermove = 0
;pausemove = 0

[State 640, 2]
type = PlaySnd
trigger1 = animelem=2
value =100+var(0), 0
channel = 0

[State 810, Width 2-11]
type = Width
trigger1 = time=0
edge = 45,45

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(4) < 0
pos = 46,0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 4
pos =  109,-27

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 3
value = -ceil(166*fvar(1))

[State 0, EnvShake]
type = EnvShake
trigger1 =animelem=3
time = 25
freq = 80
ampl = -3
;phase = 90

[State 640, 2]
type = PlaySnd
trigger1 = animelem=3
value =2, 3
channel = 0
;abspan =
;ignorehitpause =
;persistent =

[State 0, TargetVelSet]
type = TargetVelSet
trigger1 = AnimElemtime(4)>=0 && enemy,vel x =0
x =-3
y = -3.5
;ignorehitpause =
;persistent =
[State 810, Throw 11]
type = TargetState
trigger1 = AnimElemtime(4)=3
value = 10612


[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 850]
type    = A
movetype= H
physics = N
velset = 0,0
[State 0, ScreenBound]
type = ScreenBound
trigger1 =1
value = 0
movecamera = 0,0
[State 850, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 807

;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 = p2stateno!=840
value = 5050

I want his "punch" throw to be like the source game (assuming you've played the version of the game before), but instead, I have this:





And how did this happen? And I didn't press/hold the Heavy Punch button, either! Previously, it was his Heavy Kick & it was hitting him while he wasn't facing him! What the hell!!

I'm completely stuck & stumped. I just don't want to spend several more days coding a basic move when I could be coding his specials & supers.

Please help.






Oh, did I mention the this is my FIRST character?[/font][/color]
I'm just a guy who likes to share his imagination with the world.

[MY M.U.G.E.N STUFF]

https://www.mediafire.com/folder/6k3pa11ce6jy6/M.U.G.E.N
https://www.dropbox.com/sh/q5mnohdn4y1i96n/AACV_HXK8I7GQ4lPo94VNvVYa?dl=0

altoiddealer

Have you tried switching off some controllers, or dumbing down the triggers, to figure out what piece of code is causing the issue?


ネオン7

Quote from: altoiddealer on August 11, 2016, 08:02:44 PM
Have you tried switching off some controllers, or dumbing down the triggers, to figure out what piece of code is causing the issue?

Awww, I thought this thread was going to be flooded with posts! My chraracter is SCREWED!


*sigh* I'm sorry. I just woke up from a long nap & I'm still pissed off that coding throws is nearly impossible to do & I don't know where to start looking. That's why the debug information is within the .gifs & why I posted the code in my initial post. And as I mentioned before, I'm using a template. some of this stuff is already done for me, so yeah...
I'm just a guy who likes to share his imagination with the world.

[MY M.U.G.E.N STUFF]

https://www.mediafire.com/folder/6k3pa11ce6jy6/M.U.G.E.N
https://www.dropbox.com/sh/q5mnohdn4y1i96n/AACV_HXK8I7GQ4lPo94VNvVYa?dl=0

JustNoPoint

Post your code so we can show you what he meant by cutting and seeing which causes the issue.

ネオン7

Quote from: Just No Point on August 12, 2016, 02:12:31 AM
Post your code so we can show you what he meant by cutting and seeing which causes the issue.

State 807:

I don't see how it's invalid when he's supposed to go into that state. But instead, I get what you see in .gif #2, which I, by the way, still haven't found out what's causing it.


Oh. And in case if you were wondering, I was watching a tutorial (https://www.youtube.com/watch?v=9cwmNHKscT0) beginning at 22:10. I followed everything on how to code a throw in that video. I could perform the grab, but I couldn't "grab" him.

I'm still looking into it.
I'm just a guy who likes to share his imagination with the world.

[MY M.U.G.E.N STUFF]

https://www.mediafire.com/folder/6k3pa11ce6jy6/M.U.G.E.N
https://www.dropbox.com/sh/q5mnohdn4y1i96n/AACV_HXK8I7GQ4lPo94VNvVYa?dl=0

JustNoPoint

#5
I meant copy paste the code you applied into the cns. What you showed me doesn't really help me aid you at all.

Except it says that you're trying to go to state 807 from 5000 and 807 doesn't exist. But at this phase I'm not sure if that info can help you. It'll be clearer after you post the code so I can explain what we meant by "remove things to test" and I can see what's trying to call 807

ネオン7

Quote from: Just No Point on August 12, 2016, 03:31:27 AM
I meant copy paste the code you applied into the cns. What you showed me doesn't really help me aid you at all.

Except it says that you're trying to go to state 807 from 5000 and 807 doesn't exist. But at this phase I'm not sure if that info can help you. It'll be clearer after you post the code so I can explain what we meant by "remove things to test" and I can see what's trying to call 807

Yeah, I ended up removing that code entirely because for some reason now, the commands for the throws got screwed up & it had nothing to do with the commands I set for them.

Anyway, this is the new coding:

Spoiler (click to show)
;Throw 1 - 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 = 2

; 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 1 - 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

; Here a variable, var(2), is used to remember whether or not the
; player was holding forward at the start of the state. This variable
; is checked later on to turn KFM around if necessary.
[State 810, Holding fwd?]
type = VarSet
trigger1 = Time = 0
var(2) = command = "holdfwd"

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

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

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

[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(12) < 0
edge = 240,0

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

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

[State 810, holdfwd - Turn 6] ;If was holding fwd before, turn now
type = Turn
trigger1 = var(2)
trigger1 = AnimElem = 6

[State 810, holdfwd - Pos 6] ;If was holding fwd before, move a little
type = PosAdd
trigger1 = var(2)
trigger1 = AnimElem = 6
x = -148

[State 810, holdfwd - Turn Target 6] ;If was holding fwd before, turn target too
type = TargetFacing
trigger1 = var(2)
trigger1 = AnimElem = 6
value = -1

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

[State 810, Bind 7]
type = TargetBind
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
pos = 100, -300

[State 810, Bind 8]
type = TargetBind
trigger1 = AnimElemTime(8) >= 0 && AnimElemTime(9) < 0
pos = 60, -360

[State 810, Bind 9]
type = TargetBind
trigger1 = AnimElemTime(9) >= 0 && AnimElemTime(10) < 0
pos = -20, -384

[State 810, Bind 10]
type = TargetBind
trigger1 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 0
pos = -56, -360

[State 810, Bind 11]
type = TargetBind
trigger1 = AnimElem = 11
pos = -200, -200

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

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

[State 810, Turn 12]
type = Turn
trigger1 = AnimElem = 12

[State 810, Pos 15]
type = PosAdd
trigger1 = AnimElem = 15
x = -40

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

;---------------------------------------------------------------------------
;Thrown by Throw 1
; (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

[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

It's KFM's code, meaning that I have to do this from the ground up! But it's not like I got far to begin with.


...

I'm becoming a train wreck, I know, but once again, throw code = near impossible & I'm the character making noob of the month, so yeah...
I'm just a guy who likes to share his imagination with the world.

[MY M.U.G.E.N STUFF]

https://www.mediafire.com/folder/6k3pa11ce6jy6/M.U.G.E.N
https://www.dropbox.com/sh/q5mnohdn4y1i96n/AACV_HXK8I7GQ4lPo94VNvVYa?dl=0

JustNoPoint

Do you know how to make a punch or something simpler 1st?

ネオン7

Yes, as I understand the coding (some of it). But like I said before, I'm using a template for my character, except the punch/kick codes are from Kamekaze's version. Although, I did tweak them to make sure that they worked, as some of the punches/kicks wouldn't hit, etc.
I'm just a guy who likes to share his imagination with the world.

[MY M.U.G.E.N STUFF]

https://www.mediafire.com/folder/6k3pa11ce6jy6/M.U.G.E.N
https://www.dropbox.com/sh/q5mnohdn4y1i96n/AACV_HXK8I7GQ4lPo94VNvVYa?dl=0

ネオン7




I got it to work using Throw Creator. I had to tweak the first & second anims, but got lucky on the third & fourth. BUT...

1. He needs to hit the ground.

2. He needs to take damage.

3.


Despite those commands, I had to press Forward+Y+B to perform the throw. How do I fix it so that it matches the commands in the image above?


4. These are the codes generated by Throw Creator:
Spoiler (click to show)
;Throw 1 (P1 Attempt)
[Statedef 800]
type = S
movetype= A
physics = S
juggle = 0
velset = 0,0
anim = 800

[State 80, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NT
hitflag = M
priority = 1, Miss
sparkno = -1
p1sprpriority = 1
p1facing = ifelse (command = "holdfwd", -1, 1)
p2facing = 1
p1stateno = 810
p2stateno = 820
fall = 1

[State 80, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Throw 1 (P1 Success)
[Statedef 810]
type = S
movetype= A
physics = N
anim = 810
poweradd = 60

[State 90, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = -5, 0

[State 90, Bind 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = -13, -62

[State 90, Bind 3]
type = TargetBind
trigger1 = AnimElem = 3
pos = -25, -51

[State 90, Bind 4]
type = TargetBind
trigger1 = AnimElem = 4
pos = 100, -38

[State 90, Bind 5]
type = TargetBind
trigger1 = AnimElem = 5
pos = 135, 0

[State 90, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 5
value = -78

[State 90, Throw]
type = TargetState
trigger1 = AnimElem = 5
value = 101

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

;Throw 1 (P2 Held)
[Statedef 820]
type = A
movetype = H
physics = N
velset = 0,0

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

;Throw 1 (P2 Thrown)
[Statedef 821]
type = A
movetype = H
physics = N
velset = 0,0
poweradd = 40

[State 101, 1] ;Gravity
type = VelAdd
trigger1 = 1
y = .4

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

[State 101, 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 101, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground


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

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

[State 810, Turn 12]
type = Turn
trigger1 = AnimElem = 12

[State 810, Pos 15]
type = PosAdd
trigger1 = AnimElem = 15
x = -40

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
I'm just a guy who likes to share his imagination with the world.

[MY M.U.G.E.N STUFF]

https://www.mediafire.com/folder/6k3pa11ce6jy6/M.U.G.E.N
https://www.dropbox.com/sh/q5mnohdn4y1i96n/AACV_HXK8I7GQ4lPo94VNvVYa?dl=0

altoiddealer

Instead of Physics = N (none) try Physics = A (air)


ネオン7

Quote from: altoiddealer on August 12, 2016, 08:16:12 AM
Instead of Physics = N (none) try Physics = A (air)

I'll try it, but right now I've gotta get some Zzz's.
I'm just a guy who likes to share his imagination with the world.

[MY M.U.G.E.N STUFF]

https://www.mediafire.com/folder/6k3pa11ce6jy6/M.U.G.E.N
https://www.dropbox.com/sh/q5mnohdn4y1i96n/AACV_HXK8I7GQ4lPo94VNvVYa?dl=0

Cyanide

You need to take this out

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

You don't have a statedef 821, you've sent him to an invalid state so he's freezing. Your "Thrown" state has a selfstate in it when he is no longer affected by targetbind. Instead of the code i have pasted up there. Put this in

[State 810, Throw 11]
type = TargetVelset
trigger1 = AnimElem = 11
y = 5

To throw him into the ground.


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.

ネオン7

#13
Quote from: Cyanide on August 12, 2016, 11:45:44 AM
You need to take this out

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

You don't have a statedef 821, you've sent him to an invalid state so he's freezing. Your "Thrown" state has a selfstate in it when he is no longer affected by targetbind. Instead of the code i have pasted up there. Put this in

[State 810, Throw 11]
type = TargetVelset
trigger1 = AnimElem = 11
y = 5

To throw him into the ground.



That's not what M.U.G.E.N is telling me.

Anyway, I tried your code & he's still floating in the air.

EDIT: Take a look at this:
;---TARGET---
[Statedef 806]
type = S
moveType = H
physics = N
velSet = 0,0
sprPriority = 0

[State 806, Turn]
type = Turn
trigger1 = !Time
trigger1 = NumEnemy
trigger1 = Facing = EnemyNear, Facing
ignoreHitPause = 1

[State 806, NHB]
type=nothitby
trigger1= 1
value=SCA
time=1

[State 806, Anim]
type=changeanim2
trigger1= !time
value=806

[State 806, Camera]
type=screenbound
trigger1= 1
value=0
movecamera=1,1
ignoreHitPause = 1

[State 806, Safety]
type=selfstate
trigger1= time>=60
value= ifelse(pos y<0, 5040, 0)
ctrl=1

Do those codes have anything to do with throws? Just curious.
I'm just a guy who likes to share his imagination with the world.

[MY M.U.G.E.N STUFF]

https://www.mediafire.com/folder/6k3pa11ce6jy6/M.U.G.E.N
https://www.dropbox.com/sh/q5mnohdn4y1i96n/AACV_HXK8I7GQ4lPo94VNvVYa?dl=0

ネオン7

#14
"Punch" Throw:


"Kick" Throw:


Here's the new code:
Spoiler (click to show)
;Throw Attempt
[Statedef 800]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 800                       ;Change animation (Def: no change)
poweradd = 10                    ;Power to add (Def: 0)
sprpriority = 2                  ;Set p1's sprite layering priority to 2 (in front)

[State 800, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NT                     ;Attribute: Standing, Normal Attack
;damage = 120                   ;Damage that move inflicts, guard damage
animtype = Heavy                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
;guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = M                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 0, 0                 ;Time attacker pauses, time opponent shakes
sparkno = 0                      ;Spark anim no (Def: set above)
sparkxy = -40, -304              ;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 = Low              ;Type: High, Low, Trip (def: Normal)
;ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = 0           ;Velocity at which opponent is pushed
;airguard.velocity = -7.6,-3.2    ;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 = -5.6,-12          ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
;air.hittime = 15                 ;Time before opponent regains control in air
p1stateno = 801
p2stateno = 803
fall = 1
;fall.recover = 1

[State 800, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Throw 1 (P1 Success)
[Statedef 801]
type = S
movetype= A
physics = N
anim = 801
poweradd = 60


[State 801, 1]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NT                     ;Attribute: Standing, Normal Attack
;damage = 50                   ;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 = M                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 0, 0                 ;Time attacker pauses, time opponent shakes
sparkno = 0                      ;Spark anim no (Def: set above)
sparkxy = -40, -304              ;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                              ;Sound to play on guard
ground.type = Low              ;Type: High, Low, Trip (def: Normal)
;ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = -0           ;Velocity at which opponent is pushed
;airguard.velocity = -7.6,-3.2    ;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 = -5.6,-12          ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
;air.hittime = 15                 ;Time before opponent regains control in air
p1stateno = 801
p2stateno = 803
fall = 1
fall.recover = 1

[State 801, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = -26, 0

[State 801, Bind 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = -17, -61

[State 801, Bind 3]
type = TargetBind
trigger1 = AnimElem = 3
pos = -32, -45

[State 801, Bind 4]
type = TargetBind
trigger1 = AnimElem = 4
pos = 107, -20

[State 801, Bind 5]
type = TargetBind
trigger1 = AnimElem = 5
pos = 106, -22

[State 823, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 3
value = -80

[State 801, Throw]
type = TargetState
trigger1 = AnimElem = 5
value = 803

[State 801, Throw]
type = TargetVelset
trigger1 = AnimElem = 5
y = 5

;[State 801, Throw]
;type = TargetState
;trigger1 = AnimElem = 5
;value = 0

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

;Throw 1 (P2 Held)
[Statedef 803]
type = A
movetype = H
physics = N
velset = 0,0

[State 803, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 803
;elem = 1
;ignorehitpause =
;persistent =

[State 803, SelfState]
type = SelfState
trigger1 = Time = 31
value =5000

;Throw 1 (P2 Thrown)
[Statedef 821]
type = A
movetype = H
physics = A
velset = 0,0
poweradd = 40

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

[State 821, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
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 = 5100 ;Hit ground


[State 821, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 5
value = -78

[State 821, Throw 11]
type = TargetState
trigger1 = AnimElem = 5
value = 5000


;[State 821, Throw 11]
;type = TargetVelset
;trigger1 = AnimElem = 5
;y = 5

[State 821, Turn 12]
type = Turn
trigger1 = AnimElem = 12

[State 821, Pos 15]
type = PosAdd
trigger1 = AnimElem = 15
x = -40

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

;Throw 2 Attempt
[Statedef 804]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 0                      ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 804                       ;Change animation (Def: no change)
poweradd = 10                    ;Power to add (Def: 0)
sprpriority = 2                  ;Set p1's sprite layering priority to 2 (in front)

[State 804, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NT                     ;Attribute: Standing, Normal Attack
;damage = 120                   ;Damage that move inflicts, guard damage
animtype = Heavy                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
;guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = M                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 0, 0                 ;Time attacker pauses, time opponent shakes
sparkno = 0                      ;Spark anim no (Def: set above)
sparkxy = -40, -304              ;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 = Low              ;Type: High, Low, Trip (def: Normal)
;ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 38             ;Time opponent is in hit state
ground.velocity = -74           ;Velocity at which opponent is pushed
;airguard.velocity = -7.6,-3.2    ;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 = -5.6,-12          ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
;air.hittime = 15
p1facing = ifelse (BackEdgeDist <= 30, -1, 1)              ;Time before opponent regains control in air
p1stateno = 823
p2stateno = 807
fall = 0
;fall.recover = 1

[State 804, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;Throw 2 - (P1 Success)
[Statedef 823]
type = S
movetype= A
physics = N
anim = 823
poweradd = 60

[State 823, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 23, 0

[State 823, Bind 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 25, 0

[State 823, Bind 3]
type = TargetBind
trigger1 = time = 100
trigger1 = AnimElem = 3
pos = 69, 0

[State 823, Hurt]
type = TargetLifeAdd
trigger1 = AnimElem = 2
value = -75

[State 823, Throw]
type = TargetState
trigger1 = AnimElem = 3
value = 807

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

;Throw 2 (P2 Held)
[Statedef 807]
type = A
movetype = H
physics = N
velset = 0,0

[State 807, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 807

[State 803, SelfState]
type = SelfState
trigger1 = Time = 31
value =5000

;Throw 2 (P2 Thrown)
[Statedef 807]
type = A
movetype = H
physics = N
velset = 25,0
poweradd = 40

[State 21, 1] ;Gravity
type = VelAdd
trigger1 = 1
y = .4

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

[State 21, 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 21, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

;[State 810, Throw 11]
;type = TargetVelset
;trigger1 = AnimElem = 3
;y = 5

I even fixed the commands that mentioned in a previous post. However, when I perform the "Punch" Throw (Throw 2 in the code) in the corner, this happens:



EDIT: I reduced the ground.velocity to -5. It's better, but still iffy. It'll have to do, though.
I'm just a guy who likes to share his imagination with the world.

[MY M.U.G.E.N STUFF]

https://www.mediafire.com/folder/6k3pa11ce6jy6/M.U.G.E.N
https://www.dropbox.com/sh/q5mnohdn4y1i96n/AACV_HXK8I7GQ4lPo94VNvVYa?dl=0