YesNoOk
avatar

Camera Trickery Hyper: Freezing Non Targets (Read 2538 times)

Started by Thi2, November 20, 2017, 10:30:37 pm
Share this topic:
Camera Trickery Hyper: Freezing Non Targets
#1  November 20, 2017, 10:30:37 pm
  • Failed Animator
  • Am I supposed to say something witty here?
    • UK
Hello! My name is Thi2, I'm a new face around here.
I'm not new to MUGEN per say: I've been making things offline for years; while not necessarily pro I'm decent enough to make a couple of working fighters. Don't expect me to immediately get everything that gets brought up, I'm no serious coder, but I'll try damn hard to follow everyone's advice regardless.

Now that the introductions are over...

I've been making a hyper. It's a big Lvl 4 hyper, runs like a command grab. Uses a ton of custom states. I want to make sure the hyper looks good on any stage: Superjump or no. I plan to do this by using an animating background to simulate vertical movement without actually moving the screen. Therefore I've toyed with the idea of setting off a noBG flag, and bringing the attacker and the target in front of that custom animated background that will hide anyone else behind it...

So I got the beta version of the attack working... In a 1 v 1 fight everything works as intended! I must say I felt proper chuffed after all that work, I was actually quite happy to have made real progress on my most complex move to date. Then the scary part dawned on me: Simul Mode.
While the attack is running, the other two characters are free to do whatever the f they want to. There's no BG covering them currently, but when there will be they'll continue beating on each other behind the black. If you happened to be playing alongside the AI and it used the attack, you would have a period of time where you can't see what you or the remaining enemy are doing. That would be bad. So I plan to freeze the characters who are not involved:
That's where the problems begin.

I want to make it so the 2 behind the background cannot move, and then when the background disappears they will get right back to what they were doing again. There's only one method that seems viable; putting the two stragglers in custom states of their own with a helper until the attack ends: But then they won't go back to what they were doing, returning to state 0 or an equivalent state. There's also the risk of a character no selling the bind with armor, invincibility frames or lack of collisions. The Pause and Super Pause SCTRLs have a different issue, the attacker's animations can continue but the target's won't trigger during the pause.

Does this description of my problem make even the slightest lick of sense? I tried to word it the best I could but if not, here's a cute video demo'ing the attack and showing the problem, in the shape of a certain cartoon cat...




I'm asking here because I've frequently googled problems I've ran into, and this forum is usually my savior when I don't brute force and trial and error my problems into submission. This is the first time I've not found what I'm looking for, so here's me hoping there's someone here who's better at this than I am and may have a solution...

Cheers!
YESGOOD.
Re: Camera Trickery Hyper: Freezing Non Targets
#2  November 20, 2017, 10:59:33 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
I think you just need to make sure the "SuperPause" is very long -- and that the Player States, Custom States, Explods, Helper's, etc, all have SuperMoveTime allowing them to move during the pause.  The other players and any other stage activity should remain paused throughout.

Re: Camera Trickery Hyper: Freezing Non Targets
#3  November 21, 2017, 03:16:31 am
  • Failed Animator
  • Am I supposed to say something witty here?
    • UK
I see. First, thanks for the swift response. Now... You're talking about the SuperPause state controller, yes? I have a sneaking suspicion that won't work, I've tried both that and regular Pause already. Maybe I did it wrong; but I tried them multiple times already for being the obvious choice, and had no luck.

I'm aware of the movetime line in the controller and have used it multiple times in the past, and I've read up that you can also make helpers animate too using supermovetime in the Helper sctrl. Trouble is I'm also handling a grab here, and the target isn't moving or animating with him. I don't think supermovetime is a line you can stick just anywhere, it certainly doesn't accept it at the start of the state def.

To provide more info: Both characters are using not binds but velocities to handle their positions on screen, (Binds would be a phenomenal pain here because of the way the move animates) and they may not register during a pause. The period the non-participants need to freeze for spans over 3 different states with multiple animation changes. (3 for Derin and 3 for the recipient) I'm needing to keep both characters animating, responding to the velocity changes and transitioning between states fluidly.

Would it be easier if I shared the code? I'm not 100% comfortable coughing it up early but you'd be able to see the entire puzzle much better with it in front of you for reference.
YESGOOD.
Re: Camera Trickery Hyper: Freezing Non Targets
#4  November 21, 2017, 04:22:32 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
Hmm... yeah, I was kind of talking out of my a** :)  It sounds like the kind of logic that would handle it, but looking further into it you're right, there aren't controller and parameters allowing this.

And of course now I remember, I did make a "Crowd Control" helper for my Jailbot character to handle a similar situation when playing Simul.  For his Arcade Hyper, he transforms into an arcade cabinet, emits a beam that catches ONE enemy, pulls him into the screen triggering a cinematic sequence.

The crowd control helper appears immediately when an enemy is hit, and remains active throughout the entire duration of the attack.  It affects all players, and detects statetype/movetype/physics and tries to gracefully ease the affected players into State 0.  If you look at the helper's HitDef, it "tags" the attack with Jailbot's PlayerID, allowing reliable trigger redirections from the custom state via the GetHitVar(**) trigger.

I coded this myself, but there may be room for improvement.  Jailbot's been released for over a year now and I haven't heard any complaints or bug reports regarding this.  If you want to see it first hand, he can be downloaded via the icon in my signature.

If you don't find a better solution, this should help:

Spoiler: calling the Crowd Control Helper (click to see content)
Spoiler: The Crowd Control Helper (click to see content)
Spoiler: Take a Break - Custom State for other players (click to see content)

Re: Camera Trickery Hyper: Freezing Non Targets
#5  November 21, 2017, 05:20:17 pm
  • ******
    • www.justnopoint.com/
Make the target have a custom state that activates the pause. Have your char turn invisible and use a helper that can move during superpause to look like it's doing the attacks
Re: Camera Trickery Hyper: Freezing Non Targets
#6  December 01, 2017, 01:11:54 am
  • Failed Animator
  • Am I supposed to say something witty here?
    • UK
Thank both of you for the suggestions: For now I'm going to create 2 of the same move, and with them use the different suggested methods... see which works better for me and keep the one that does the trick. They both sound completely plausible and I'm fairly certain I know how to implement them, so I'll mark this thread as solved. I'll come back if I have any further questions, but I shouldn't have to unless something unexpected happens. Again, thanks.
YESGOOD.
Re: Camera Trickery Hyper: Freezing Non Targets
#7  December 01, 2017, 01:14:53 am
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
Try JNPs solution first, because I think it's going to work better for what you're doing.  I wasn't aware of that technique, or I may have even coded the thing in my character differently :)