YesNoOk
avatar

Problem with using "parent" (Read 678 times)

Started by ShinzuiUindo, December 26, 2008, 02:53:07 pm
Share this topic:
Problem with using "parent"
#1  December 26, 2008, 02:53:07 pm
    • su-site.ucoz.com/
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?
Re: Problem with using "parent"
#2  December 26, 2008, 02:59:18 pm
  • ******
  • I'm a fuffy.
    • USA
    • www.trinitymugen.net

  • Online
That's because -2 is for the parent ONLY. You put a destroyself inside the helper and use trigger1 = parent, MoveType = H.
Re: Problem with using "parent"
#3  December 26, 2008, 03:07:00 pm
    • su-site.ucoz.com/
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?
Re: Problem with using "parent"
#4  December 26, 2008, 03:30:24 pm
  • ******
  • I'm a fuffy.
    • USA
    • www.trinitymugen.net

  • Online
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.
Re: Problem with using "parent"
#5  December 26, 2008, 03:53:02 pm
    • su-site.ucoz.com/
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)
Re: Problem with using "parent"
#6  December 26, 2008, 04:13:23 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
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 [mcode]ishelper[/mcode] trigger.
Re: Problem with using "parent"
#7  December 26, 2008, 04:18:52 pm
    • su-site.ucoz.com/
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.
Re: Problem with using "parent"
#8  December 26, 2008, 04:28:52 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
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.
Last Edit: December 26, 2008, 04:38:19 pm by Rajaa
Re: Problem with using "parent"
#9  December 26, 2008, 10:02:01 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/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.
Re: Problem with using "parent"
#10  December 28, 2008, 07:52:04 pm
    • su-site.ucoz.com/
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
Code:
trigger1 = ishelper && parent,stateno != 2100
I made the message stop appearing after I edited it like this:
Code:
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.
Re: Problem with using "parent"
#11  December 28, 2008, 07:56:37 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
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.