YesNoOk
avatar

Helper's P2stateno = (Read 532 times)

Started by Guillier, March 15, 2009, 01:08:51 pm
Share this topic:
Helper's P2stateno =
#1  March 15, 2009, 01:08:51 pm
  • avatar
  • **
Hi...
I have problem and need help.
I make a Helper as a Projectile.
I make hitdef that have p2stateno = 10000.
Everything Works Fine.
When My Helper hits the P2... He goes to my custom States.
The Problem Is...
It Cant Hit Some Other Helpers...
Help Please...

Spoiler, click to toggle visibilty
Re: Helper's P2stateno =
#2  March 15, 2009, 01:56:58 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
Maybe the other helpers can't be hit because they are coded not to be hit by projectiles. Other than that, your problem is unclear.
Re: Helper's P2stateno =
#3  March 15, 2009, 02:23:24 pm
  • ******
1) Don't use p2stateno, use a separate state controller - TargetState triggered on movehit and numtarget. The helper you hit will do whatever it needs to do by itself (like, disappear after activating its hitoverride) and you're safe. Also you must consider what happens when you hit but the target is gone (you hit a fireball, the fireball disappeared because that's what it's supposed to do, what does your projectile do then ?)
2) For safety you can always add a destroyself in the custom state you send your opponent to.
That's generally speaking. Now, like Rajaa, I'm not completely sure what you mean and what you actually try to get.
3) Do you want to hit the opponent's helpers ? Why, you want to send a fireball to a custom state ? That most likely shouldn't happen. So what is supposed to happen instead when in that situation ? Deal with that with point 1).
4) If they have a hitoverride, I forgot but I think that indeed, a hitdef with p2stateno will miss them altogether. I think that's a normal behavior - because quite frankly, this situation is a deadlock : what is it supposed to do ? Have your projectile activate its p2stateno and then disappear, and not care if the target shouldn't be put in a custom state because it's a fireball ? Or have the target do its own hitoverride, but then what happens to your projectile ?

So if you want to hit the opponent's fireball but not send them to your custom state, and still send the real opponent to your custom state, then point 1) should be enough. Simply, you're the one who's supposed to decide what you want to happen when your projectile hits a fireball.
Other than that, what you want to happen is inded not too understandable. You should specify what you expect it to do.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Last Edit: March 15, 2009, 02:33:50 pm by Byakko
Re: Helper's P2stateno =
#4  March 15, 2009, 03:03:42 pm
  • avatar
  • **
1) Don't use p2stateno, use a separate state controller - TargetState triggered on movehit and numtarget. The helper you hit will do whatever it needs to do by itself (like, disappear after activating its hitoverride) and you're safe. Also you must consider what happens when you hit but the target is gone (you hit a fireball, the fireball disappeared because that's what it's supposed to do, what does your projectile do then ?)

Oh what you have said Solved my Problem.
*TargetState Sends enemy to my custom States.
*My Helper(as a projectile) Hits another helper even it have a hitoveride.
*My Helper(as a projectile) Hits another helper without sending it to a custom state.
Everything's Fine Now.  :sugoi:

Thank You Very Much.  ;D
                     
Re: Helper's P2stateno =
#5  March 25, 2009, 08:50:59 am
  • avatar
anybody could explain real quick what is those helper states in Mugen?
my english is not 100% good.. im trying to figure it out..  i took some sprites from another character and i did an animation with that..

im trying to make this animation an assist type special move like Marvel vs Capcom.. so another char can come help my char in battle but i just dont know how to code that animation so it doesnt remplace the main char anim :S

help please
Re: Helper's P2stateno =
#6  March 25, 2009, 10:19:37 am
  • ******
You should make another topic instead of hijacking this one. You could also read the docs.
A helper is basically a new instance of... something. An object.
You create a helper by using the [mcode]helper[/mcode] (click it) state controller. Give it a state number to start at. Then, create the corresponding statedef as when the helper comes out : the helper will start at this statedef, an your character will still be there - you will have both your character and the helper.
You can manipulate that state like you would any other normal state. You can change its position, velocities etc., you can give it a changestate to another state also reserved for the helper... Then when you're done with the helper, don't forget to use a DestroySelf.
For an assist character, you can create the helper, place it offscreen, have it jump in, land in his own state, do its thing (attack, heal...), and then leave the screen, and destroy itself.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.