News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Problem with using "parent"

Started by ShinzuiUindo, December 26, 2008, 02:53:07 PM

Previous topic - Next topic

ShinzuiUindo

I tried making a helper with keyctrl = 1, but I want to make it disappear if the parent is hit (for example). I wrote "parent,stateno = " as a trigger in [StateDef -2]. It does work, but if I run the game in Debug mode, a message
"*number*: WARNING: PLAYER *char name* (56) IN STATE *current state of the char*: HAS NO PARENT"
keeps showing every tick of the game time. Can I prevent this and how?

Jesuszilla

That's because -2 is for the parent ONLY. You put a destroyself inside the helper and use trigger1 = parent, MoveType = H.

ShinzuiUindo

But I want to make the helper move like a parent, like, while the parent is doing something you control the helper and when the parent is done doing it or gets hit to make the helper disappear. In which state should I put it?

Jesuszilla

Eh? The destroyself (or changestate, if you want the helper to go into a hurt state, like a JoJo stand for example) goes in the helper. If the helper goes into an animation dependent on the parent's state, then stateno would be appropriate.

ShinzuiUindo

The helper doesn't have it's own state. It uses state 0 for standing animation (only at the beginning I set a different state do set a variable that marks it as a helper, but then it switches to state 0)

Rajaa Retired

give the helper it's own states to avoid any complications. If you must use already made states and share them between the parent and the helper, then learn to use the ishelper trigger.

ShinzuiUindo

If I use a custom state for standing, then if the helper is jumping he will disappear when he lands and gets up from landing and I will have to edit every state in common1 and the char's cns that leads to state 0 to make it lead to the custom state if it's a helper.

Rajaa Retired

#7
exactly, nobody said it was a short process.

for helpers the physics should never ever be A, make the physics=N and then make him go to the landing state of your choice when pos y>=0 && vel y>0. for sufficient hit states you could either make your own, or like i said use Ishelper triggers,


you can look in my lilith to see how i did my clone. there's pretty much only 2 ways to do it. New states, modify states usoing ishelper triggers, then you'd have to set different statetypes for helpers. just make new states.

I do suggest looking at my lilith though, right inside her common1 hitstates.

Cyanide

If you're using keyctrl = 1, put the parent, stateno bit in the .cmd under state -1, the helper will be able to read that. But you still MUST have ishelper as a trigger.


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.

ShinzuiUindo

Quote from: Cyanide on December 26, 2008, 10:02:01 PM
If you're using keyctrl = 1, put the parent, stateno bit in the .cmd under state -1, the helper will be able to read that. But you still MUST have ishelper as a trigger.
That's exactly the way I'm doing it. It works, but the message keeps showing. I solved the problem. Before I was writing
trigger1 = ishelper && parent,stateno != 2100
I made the message stop appearing after I edited it like this:
trigger1 = ishelper
trigger1 = parent,movetype = h

I didn't remember at the first post, but I did this with state -1 the whole time. destroyself doesn't work in state -2.

Rajaa Retired

yeah, it's always smart to keep triggers like "numhelper" and "ishelper"  above the other triggers in an sctrl so MUGEN can determine that first to see if it should continue reading the rest. Reading  them all together would give debug spam since only helpers can have parents.