The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => Topic started by: Nep Heart on January 03, 2019, 08:56:56 am

Title: Root Inheriting Helper Movetype = H
Post by: Nep Heart on January 03, 2019, 08:56:56 am
 I'm current working on a character with a built-in system where she can call upon assists into battle. One of them is a semi-permanent assist that once summoned, he passively attacks for root periodically. He works fine for the most part except an issue... whenever the assist is sent into his own hit state (completely separate from the root's), the root ends up inheriting the helper's hit state. This happens when both the root and helper assist are simultaneously hit by a hitdef that triggers targetstate and the helper gets hit while the root is still in custom state.

 Here is a gif to demonstrate the basic idea of the problem.

(https://cdn.discordapp.com/attachments/256973975572316160/530157420538757158/hitoverridebug.gif)

 I actually consulted another coder at a different place I frequent and he told me that whenever a hitoverride is used, they will go to prevstateno = 5000/5020 for an extremely brief moment before being sent to the stateno assigned by the hitoverride. So, the solution was to make it so that the target is dropped so that hitting the helper doesn't make the root inherit the assists movetype = H. Problem is that dropping the target too soon leads to another issue; it interferes with combos themselves, which in turn means my character's damage scaling and juggling system will also fail too.

 I'm torn between how to handle it since it seems as if I can't have one or the other, but I am sure there is a solution that says otherwise.
Title: Re: Root Inheriting Helper Movetype = H
Post by: Odb718 on January 03, 2019, 02:46:52 pm
I'm not exactly sure how or why it's happening. I _believe_ I had this same problem with Yun&Yang. It's been so long since I've worked on that char I cant clearly remember. If you want to poke around in it,
https://host-a.net/f/138308-yunyang718rar
Title: Re: Root Inheriting Helper Movetype = H
Post by: Cyanide on January 05, 2019, 10:59:34 am
Your helper should have his own hitstates completely. In addition he doesn't need to be movetype h at all unless you want him to take damage from your opponents hits.

You haven't made it helpertype player have you? That can do some weird stuff as helpers normally don't become targets via hitoverride...
Title: Re: Root Inheriting Helper Movetype = H
Post by: Nep Heart on January 05, 2019, 11:14:54 am
 Just tried Idle statetype and I still get the same thing.

 Also, no, Kyon's a normal helper actually.
Title: Re: Root Inheriting Helper Movetype = H
Post by: inktrebuchet on January 05, 2019, 04:28:08 pm
What’s the targetstate look like, is there something in it that causes this to happen?
Title: Re: Root Inheriting Helper Movetype = H
Post by: Nep Heart on January 06, 2019, 12:24:52 am
 It's a custom knockdown state. Here's what it looks like.

Spoiler, click to toggle visibilty



 Just to be safe and make it easier on everyone, I'll also post the relevant codes for the assist itself.

Spoiler, click to toggle visibilty

 This is the helper that remains for the entire round and is only present after intros and before win/lose states. This helper is used to call forth and monitor all assists, therefore, it's a helper that also calls in other helpers.

Spoiler, click to toggle visibilty

 These are all states for Kyon himself (the assist helper that is the topic of this thread).

Spoiler, click to toggle visibilty

 All the statedef -2 stuff for the Kyon assist as well as what calls in the helper that monitors all assists.

 This is actually my first time making assists lol.
Title: Re: Root Inheriting Helper Movetype = H
Post by: Cyanide on January 06, 2019, 09:03:25 am
Hang on. How are you hitting the helper with a custom state attack? Have you done a normal hit and then thrwn targetstate at it? You have a couple of options.

 Use p2stateno in the hitdef. It'll miss the helper altogether.

 Use hitonce = 1 in the hitdef and id the hitdef as well. Then stick with targetstate but only apply it to the id in question. Long as your helper stops being a target you should be good there.

Alternatively you could run a targetdrop right after the targetstate. So additional hits shouldn't affect your prior target
Title: Re: Root Inheriting Helper Movetype = H
Post by: Nep Heart on January 06, 2019, 09:49:13 am
 Yeah, I've been using targetstates and hitdefs with IDs attached to them for custom stating since p2stateno has given me headaches in the past.

 Targetdrop interferes with combos, which in turn messes up my damage scaling and juggle system.

 Tried hitonce and it seems to have actually worked. The root stops going into the same hitstate as her assist when I tried every custom stating move she has. I can't believe I didn't notice this parameter in the past.

 Thanks!