YesNoOk
avatar

How to create a freezing attack (Read 9663 times)

Started by zzazman, December 31, 2017, 03:55:59 am
Share this topic:
How to create a freezing attack
#1  December 31, 2017, 03:55:59 am
  • *
Hello everyone, I'm zzazman, and I'm new here. I asked this question over at BLACKLISTED WEBSITE, with little feedback.

I'm working on 2 characters, both of which are named Milk, and one of which is a Priestess, which you can preview here:

Spoiler: NSFW (click to see content)

She's in the beginning stages of development. Right now, I have all the basics, such as moving, jumping, crouching, guarding, getting hit, standing attacks, crouching attacks, air attacks, a throw, etc etc.

I'd like to move on to developing her special attacks. The first one I want for her is an attack where, if she jabs you with her staff, she suspends both herself and her target(s) in place until a certain amount of time has passed or until the player/target(s) involved get hit, and in either event, both the player and the target(s) are released from the attack. If the attack connects while the target(s) are already in the freeze animation, it automatically releases them to prevent infinites. It doesn't deal any damage, because she's designed to be a support character, and her partner is supposed to attack them while they're suspended. Meanwhile, an enemy can save their ally by attacking her while she's suspended.
I was thinking that I have to use a custom GetHit state, but I don't have much experience here. Anyone know how to code this?

Here's what I have so far:

Spoiler, click to toggle visibilty

Thanks~
Last Edit: December 31, 2017, 03:59:37 am by Speedpreacher
Re: How to create a freezing attack
#2  January 02, 2018, 12:41:27 am
  • *****
  • Shame on you!
    • USA
You should consider this a Throw. It's going to act very much like a throw. You touch P2, and then control the next few actions.
SeanAltly's Sub Zero has a freeze move. I've made a 6 button edit here It's not going to work the same way, but if you wanted to get an idea you can browse through it.

You're going to need a
P1StateNo=
and
P2StateNo=
in the hitdef.
You may also want to set up a second hitdef that watches if P2 has been hit with the freeze.
You're going to need a selfstate that has a few triggers in P2's custom state. One for time, one for P3 hitting them, and one for P1 getting hit.

In state 1000 you may want to add a changestate trigger that works on total time. There may be an instance where your trigger can be ignored. You should always have a fall back on getting out of a throw. And with P3 running around being able to hit P2 bugs WILL happen.
vVv Ryuko718 Updated 10/31/22 vVv
Re: How to create a freezing attack
#3  January 02, 2018, 10:06:12 pm
  • *
Yeah it's essentially a melee version of Sub Zero's freeze, except she freezes herself as well. Thanks for the recommendation; I'm unable to go in and work on Priestess right now, but I'll give that a shot when I get the chance, and then I'll get back to you.

I kinda figured that the kind of code I'm requesting would be pretty messy, and that there were bound to be bugs. Would it function better to just make the freeze time-based? I really don't want to abandon the double freeze since I'm trying to carve out a strategic niche for the character, and I don't want to step on Sub Zero's toes. If it's strictly time based, it could be really overpowered unless it has a decent amount of start-up frames or if it doesn't last for too long (like 60 ticks or so).
Re: How to create a freezing attack
#4  January 03, 2018, 02:00:32 am
  • *****
  • Shame on you!
    • USA
Sub Zero has the 2nd attack freeze him. You can always use a variable to keep track if the move has hit, and when P2 isn't being hit by a combo from it. This way you wont be able to do the move 2 times in 1 combo. aka an infinite.

If the move freezes both P1 and P2, I'm not sure how P1 can attack twice?

Just remember to use Debug (ctrl+D) to watch when P2 is being sent into a custom state and when they come out of it. The custom state values from debug will change to yellow. You'll also need a selfstate instead of changestate to end the get hit state. If you need to switch from one state where P2 is hit, to a second reaction, you'd use a changestate. When you want P2 to regain control you use selfstate. EACH custom state you use should ALL have a selfstate in it; With a very big timer that wont ever be able to be reached while everything is working perfectly. Because bugs will happen. If somehow P2 is out of the loop and cant be hit, your timer of 400 tics will expire and the match will be able to continue. If it's not there, F4 or Esc will be pressed.
vVv Ryuko718 Updated 10/31/22 vVv
Re: How to create a freezing attack
#5  January 03, 2018, 06:25:25 am
  • *
Wow, I think I got it? I don't want to be too sure, so here's the code:
 
Spoiler, click to toggle visibilty

Thanks for explaining the ChangeState/SelfState thing for me, it finally clarified what I was doing wrong with her regular throw as well! After testing this out, I think it needs a code that tells P1 and P2 not to be able to be pushed around while they're in State 1010 and 1020, and maybe a few safety net codes
Re: How to create a freezing attack
#6  January 03, 2018, 09:23:19 am
  • *****
  • Shame on you!
    • USA
One thing, P1 doesn't need selfstates, just P2. P2 has his own states until you "throw" him. Once you grab him with the first move, the hit, you send him into P1's statedefs. He has to return to his own, so you SelfState him. Usually a hit reaction state, or state 0 or something similar.


With my Ibuki, I have the big frog ultra. It uses a technique where the actual animation is invisible, but the hit boxes are still there. I put an Explod on top of the invisible frames, so it LOOKS like Ibuki and the frog are there. But when P2 push-blocks or something similar, nothing can happen to the Explods. If I have ctrl+C on, you can see the collision boxes being pushed around. You'll probably want to mimic this for your special if you want them frozen in place. You may also want to think about screen bound also.

When you have two State Controllers that are exactly the same, you can just combine the triggers. 
Spoiler: So This (click to see content)
Spoiler: Becomes This (click to see content)

It looks like you have a solid start to it. Is it working good in game? You may want to take it into 2vs2 and play a bunch of rounds with it.
vVv Ryuko718 Updated 10/31/22 vVv
Re: How to create a freezing attack
#7  January 03, 2018, 03:39:19 pm
  • ******
  • Loyal to the Game
    • USA
    • http://jesuszilla.trinitymugen.net/
Or you could make a HitDef with a really long hitpause and use TargetDrop.
Re: How to create a freezing attack
#8  January 04, 2018, 04:47:22 pm
  • *
@ Odb718
@ Jesuszilla
I've tested the move out a bit more, it only works as intended in 1v1's.

I looked up TargetDrop on Elecbyte's state controller reference page. I'm guessing I can use that to drop either P1 or a specific Enemy Player(s) from the attack if that player get hit, right? The way it works now, in 2v2's, the attack can only affect one enemy player as intended, and not both. If you try to hit the other enemy with the attack, it just puts that enemy into a knockdown state, but it still freezes Priestess. That's only if you land the attack on one enemy. If you manage to land it on both of them, it doesn't even hit one of the enemies. I think this has to do with the "P2stateno" line in the hitdef. What do you think?