YesNoOk
avatar

Need help creating a throw (Read 9052 times)

Started by belphe89, May 30, 2020, 06:44:21 am
Share this topic:
Need help creating a throw
#1  May 30, 2020, 06:44:21 am
    • USA
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 toggle visibilty

Thank you for your time.
Re: Need help creating a throw
#2  May 30, 2020, 11:30:59 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/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.
Re: Need help creating a throw
#3  May 30, 2020, 05:55:41 pm
  • avatar
  • ***
  • Original characters are my forte.
    • http://network.mugenguild.com/bane84/
Spoiler, click to toggle visibilty

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.
Re: Need help creating a throw
#4  June 03, 2020, 10:30:41 am
    • USA
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?

Last Edit: June 03, 2020, 10:34:51 am by belphe89
Re: Need help creating a throw
#5  June 04, 2020, 09:18:26 pm
  • *****
  • Shame on you!
    • USA
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 Ryuko718 Updated 10/31/22 vVv
Re: Need help creating a throw
#6  June 05, 2020, 09:30:04 am
    • USA
@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 toggle visibilty

This is what I'm trying to make it look like V
Spoiler, click to toggle visibilty

Thank you so much for the help.
Re: Need help creating a throw
#7  June 05, 2020, 06:22:48 pm
  • *****
  • Shame on you!
    • USA
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 Ryuko718 Updated 10/31/22 vVv
Re: Need help creating a throw
#8  June 06, 2020, 01:20:51 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/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.
Re: Need help creating a throw
#9  June 13, 2020, 11:46:35 am
    • USA
@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 toggle visibilty

I'd have to thank you again for helping me out with this. it feels like I'm close to getting it done.
Re: Need help creating a throw
#10  June 14, 2020, 07:53:01 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/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.
Re: Need help creating a throw
#11  June 30, 2020, 09:35:42 am
    • USA
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.


Re: Need help creating a throw
#12  July 02, 2020, 01:33:12 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Need to see all states again.


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: Need help creating a throw
#13  July 02, 2020, 07:10:06 am
  • *****
  • Shame on you!
    • USA
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 Ryuko718 Updated 10/31/22 vVv
Re: Need help creating a throw
#14  July 02, 2020, 10:00:31 pm
    • USA
@Cyanide

Here you go.

Spoiler, click to toggle visibilty
Re: Need help creating a throw
#15  July 03, 2020, 01:31:41 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/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.
Re: Need help creating a throw
#16  July 04, 2020, 08:27:34 am
    • USA
@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.
Last Edit: July 04, 2020, 08:30:46 am by belphe89
Re: Need help creating a throw
#17  July 22, 2020, 12:50:41 pm
    • USA
@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 toggle visibilty
Last Edit: July 22, 2020, 11:49:13 pm by belphe89
Re: Need help creating a throw
#18  July 23, 2020, 08:02:08 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/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.
Re: Need help creating a throw
#19  July 26, 2020, 11:48:11 am
    • USA
@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 toggle visibilty