YesNoOk
avatar

how to send p2 to a state on this condition? (Read 3148 times)

Started by Daimonmau, December 12, 2008, 04:12:12 am
Share this topic:
how to send p2 to a state on this condition?
#1  December 12, 2008, 04:12:12 am
  • ***
I need to make that when certain special moves of my char hit the enemy, the enemy is send to a certain stateno but only if the life of the enemy is 0.
I can put on the hitdef "p2stateno =", but how i make that it only will work if the life of p2 is 0?
I am kind of without ideas here, except if i use a helper, but i din't want to create a helper just to make this work (except if its the only way)

there is a quick way or i will have to do this via helpers?
Re: how to send p2 to a state on this condition?
#2  December 12, 2008, 04:28:07 am
  • ****
    • Hungary
    • seravy.x10.mx/Wordpress
Put him into that custom state anyway, and add a selfstate as the first controller of the custom state, and change him to the appropriate gethit stateno, if his life>0.
Or, even better, at the end of the attack, use an additional hitdef/projectile which only triggers if P2Life=0, and always hits.
If you don't want the opponent to get KOd, you also need to use AssertSpecial flag=NoKo
Re: how to send p2 to a state on this condition?
#3  December 12, 2008, 05:43:27 am
  • ***
making a projectile doesn't work, because when the enemy is killed by a certain move he can't be hit by nothing else, so the projectile don't hit him. and i have tried what you said before the projectile stuff and it din't work or i did wrong what you said (hum... explain more)

what i want to do is that when certain kinds of moves of my char kill the oponent, the oponent disappear while a effect/explosion happens. (and now that i think about it the explosions/effects can't be on the state where the enemy is send... cause he doesn't has the effects and stuff...)
Re: how to send p2 to a state on this condition?
#4  December 12, 2008, 05:46:02 am
  • avatar
  • ******
    • Thailand
you can add a hitdef that triggers when p2 damage is less than or equal to the damage in your hitdef

or you can use thetargetstate sctrl, then trigger it accordingly.
Re: how to send p2 to a state on this condition?
#5  December 12, 2008, 09:43:06 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Fatalities. There's actually a tutorial on this somewhere IIRC.

Revolves around all your hitdefs having kill = 0 in round 2

kill = ifelse(roundno = 1, 1, 0) or whatever. Then you have a helper in state -2 who shows up when enemy life is 1 (kill = 0 means life will go as low as 1)

You then have p2 go into a dizzy state. And make your character do a fatality through the normal .cmd method of entering the command. They're generally pretty shit though when you get them working. Mostly cos the MK effects fit so few art styles.


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: how to send p2 to a state on this condition?
#6  December 12, 2008, 11:59:04 am
  • **
Add kill = 0 to your hitdef and in your custom state for p2 add this controller at the top:

[State XX, are you alive?]
type = SelfState
trigger1 = Life>1
value = 5050 ; or whatever hittype you want

Here the life=1 "simulates" the players death, youve then got to kill p2 somewhere in that state (with a hitdef or lifeadd).
Latest Creation: SSBB Assist Trophies
Re: how to send p2 to a state on this condition?
#7  December 13, 2008, 07:35:41 pm
  • ***
hĂș? fatalities? no, my char allready has fatalities, what i want is that when some special moves hit and kill the enemy (so, no kill=0) he (the enemy) is send to a certain custon state. but only if the enemy is killed to him be send to this custon state.

but i will take a look on this "targetstate", i din't know this code
Re: how to send p2 to a state on this condition?
#8  December 13, 2008, 07:42:55 pm
  • ***
humm... but how i use this "target state"? on that link there was no example.

i have tried this:

[State 907, targetstate]
type = targetstate
trigger1 = p2life = 0
value = 7026
ctrl = 1;-1

but what happen was that the enemy was not send to the state 7026, but the effect of that state appear on the screen.
Re: how to send p2 to a state on this condition?
#9  December 13, 2008, 07:55:42 pm
  • ******
  • [E]
    • Mexico
why are you giving him ctrl anyway ?
Re: how to send p2 to a state on this condition?
#10  December 13, 2008, 08:40:47 pm
  • ***
i was in doubt, hahaha, but the result is the same, p2 is not send to that state but the special effect of that state happens on the screen
Re: how to send p2 to a state on this condition?
#11  December 13, 2008, 10:19:26 pm
  • **
Why wont you do it with simulating death with Life=1 and then kill the character in the custom state, like i told you in my last post? It has the effect that you want and is much easier than trying to bypass the "death event".
Latest Creation: SSBB Assist Trophies
Re: how to send p2 to a state on this condition?
#12  December 14, 2008, 12:30:40 am
  • ***
and how i do that? and in case you din't get what i am asking, i will give one exemple: my char make a super punch that send the enemy flying and do xx damage. now i want that, if he kill the enemy with this punch, the enemy explods (disapears from screen and a explosion take his place (more or less like the brutality of the mortal kombat)). the explosion and the state where the enemy disappears is done, what i don't know is how to make that punch send the p2 to that state ONLY if p2 is with life = 0 (since i can't use triggers here)
(and, if possible, without utilizing helpers. i know a way to do this with helpers, but i want to know if there is other way without helpers and stuff)
Re: how to send p2 to a state on this condition?
#13  December 14, 2008, 03:02:50 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
p2stateno in the hitdef, damage = 0, lifeadd in the p2stateno state and if life = 0 somewhere inside that state, changestate to another one and have him blow up.

The explosion will have to be dealt with by p1 as p2 won't always have the sprites.

And after that, i suggest a posset for p2 at y = 200 and then selfstate to 5150 and give him ctrl back.


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: how to send p2 to a state on this condition?
#14  December 14, 2008, 03:34:30 am
  • ***
"The explosion will have to be dealt with by p1 as p2 won't always have the sprites."
I know
"And after that, i suggest a posset for p2 at y = 200 and then selfstate to 5150 and give him ctrl back."
yes, it is allready done
but...
"p2stateno in the hitdef, damage = 0, lifeadd in the p2stateno state and if life = 0 somewhere inside that state, changestate to another one and have him blow up."
i din't get, explain better...

I allready made work with this:
[State 907, targetstate]; 907 is the punch, 7026 is the state to the p2
type = targetstate
trigger1 = p2life = 0
value = 7026
but the problem with this way now is that when p2 is killed by the punch he says his death scream, fly away and THEN go to the 7026 state. but i want it to be instantaneous, that he is killed by the punch and "kabum+scream", no "scream... kabum"
Re: how to send p2 to a state on this condition?
#15  December 14, 2008, 03:38:24 am
  • ***
hum... or if the enemy scream and dies, fly away a little and scream again as explod... that could be coll...
Re: how to send p2 to a state on this condition?
#16  December 14, 2008, 03:54:24 am
  • **
I would do it that way (like ive mentioned before, but more precisely now):
In your special punch add to the hitdef:
kill = 0
p2stateno = XX  ;  XX = your special explode state
Also dont change the damage.

In your special explode state add this controller at the beginning:
[State XX, are you alive?]
type = SelfState
trigger1 = Life>1
value = 5050
This controller will send the enemy into his falling state, but ONLY if he would SURVIVE your special punch.

Anyway you need one more controller in that state to actually kill the enemy (Put this controller AFTER the previous controller):
[State XX, Kill the bastard]
type = LifeAdd
trigger1 = Time = YY ; YY = when you want to hear enemys death scream (probably Time = 0)
value = -1
kill = 1
absolute = 1

I dont exactly know how you made your special state, but you definitively need changeanim2 for the explosion.

The only problem here is that the enemy will be dead AND trapped into the custom state.
This pauses the game for some time before the characters perform their winpose I think. You might try that out.
Latest Creation: SSBB Assist Trophies
Re: how to send p2 to a state on this condition?
#17  December 14, 2008, 04:04:42 am
  • ***
"Kill the bastard", hahahaha, sacanagem
yeah, but this special punch sends the enemy flying on a certain direction, flashing and spining. so, if in the custon state is send him to his fall animation if he has survived the punch, he will be on the right kind of fall? (direction, flashing, spining)
and the other 6 or 8 moves that will make the enemy explod as well (if he is killed by some of this moves), they make the enemy fall on diferent ways. so what i do? (hum... maybe i put a "trigger1 = p2stateno = 907" on the state where the p2 is (so the "trigger1 = p2stateno = 907" is refering to player 1? and put diferent fall animations... but the enemy will be flashing and flying on the right speed and on the right direction?)
Re: how to send p2 to a state on this condition?
#18  December 14, 2008, 04:26:30 am
  • **
As long as you have all the velocity in you hitdef (like ground.velocity = -4,-4 or air.velocity = -4,-4) this velocity wont change if the character changes to the fall state 5050.
State 5050 will only add gravity (so it will add your "yaccel" constant to vel Y) if you didnt change the standard state 5050.
The flashes should also be specified in the hitdef (palfx.time=... and palfx.add=... and so on) and will persist if you change to state 5050.

So that way each move can have its own velocity impact onto the enemy. It wont be influenced by the custom state.

Edit: forgot the "spinning". Do you mean hitanim->diagup? These fall anims have their own state I think, that could be a problem if your attacks each use different hit anims. You could add more selfstate controllers with different states dependent on the prevstateno.
Just try playing with the hit state numbers in the selfstate controller.
Latest Creation: SSBB Assist Trophies
Last Edit: December 14, 2008, 04:38:01 am by MikeDaBike
Re: how to send p2 to a state on this condition?
#19  December 14, 2008, 04:51:30 am
  • ***
i will try this then. i will post here again if some problem appears, but i presume that now i will get his thing done.
thanks men, hahaha