YesNoOk
avatar

P2 Custom state using P1 Explods? (Read 845 times)

Started by Sheng Long, October 08, 2012, 09:42:50 pm
Share this topic:
P2 Custom state using P1 Explods?
#1  October 08, 2012, 09:42:50 pm
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
I'm trying to do a SFII style quote system (where a defeated opponent's portrait is shown) when the match is over. I already have the winner's portrait showing, but I want the defeated opponent shown on screen. For example, let's assume it's Kung Fu Man. if I defeat Kung Fu Man, and he does not have a defeated portrait existing, I want to use a sprite of one of his get hit frames from one of his head position offsets.
What I have done so far is to put the defeated opponent into a custom state when the match is over. If a defeated portrait exists with a character, I probably won't have any problem showing it. But if a defeated portrait does NOT exist, this is where I am having trouble. I was trying to make it so the defeated opponent displays an EXPLOD that exists within P1's animation actions. Sort of like an Anim2 for the character, except as an explod type. But it seems that the opponent is only able to display explods from animation actions from its side only. Any ideas, suggestions would help. :)


Also, this is unrelated to the topic, but is there an alternative way to remove the 'Recovery" command? Since it is a required command, however I don't want my character to have a recover command. So I guess the alternative here would be to have a humanly impossible command instead?

"You must defeat my flaming
dragon punch to stand a chance."
Re: P2 Custom state using P1 Explods?
#2  October 08, 2012, 09:47:56 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Explods created in custom states will always be displayed from your opponents .air file. There is no explod2 like there is changeanim2.

What you could potentially do is keep p2 in the custom state, display an explod of anim 5150 and then changeanim2 p2 to use him as the portrait.

You can remove the recovery command, you just have to override the common1 states. I think you can assertspecial it off as well but i can't rememebr if that one exists.


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: P2 Custom state using P1 Explods?
#3  October 08, 2012, 10:53:10 pm
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
Yea that's what I originally thought. So I guess it's impossible universally, like how throws are, but very possible in a full game as long as the animation exists. :S

I guess what I could do is, make a note for the character to add an action line into the other characters animations .air file to be compatible with the characters quote system. :-\

"You must defeat my flaming
dragon punch to stand a chance."
Re: P2 Custom state using P1 Explods?
#4  October 10, 2012, 06:39:23 am
  • ***
    • USA
If you're trying to use an explode from Player1 in your win quote, do just that. Dont code it in the custom state. Code it in the winner's portrait state.
You could layer the sprites in such a way that you could ALWAYS post the P1 explod. It'd be under the P2 sprites so it wouldnt show if the enemy has it.
Just be mindful of all the sprite priorities.
           
Re: P2 Custom state using P1 Explods?
#5  October 10, 2012, 07:20:35 am
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
Well, I think I need to put P2 in custom state, and have them read their animation anyway. Considering that they will be reading their own defeated portrait.

The original idea was to put P2 into a custom state, and have P2 display an upscaled version of itself via explod using a hit sprite from the head position, reading from P1's animation data, much like P2 getting thrown. But as far as from what we know from this topic, P2 can only display exolods from their own animation files.

I suppose the only alternative would be to use AngleDraw, and upscale the root character defeated, reposition them on screen, and have that display instead. But unfortunately most of my code is using explods at this point. Besides, I think actual defeated portraits would work better as explods rather than as a root character animation anyway.

"You must defeat my flaming
dragon punch to stand a chance."
Last Edit: October 10, 2012, 07:24:27 am by N-Mario
Re: P2 Custom state using P1 Explods?
#6  October 11, 2012, 04:52:25 am
  • ***
    • USA
I cant understand the problem here. Every character uses 5010 for instance. So why cant you use that animation data from P2?? I dont get why you have to read from P1's animations for a stock animation.
Cyanide, if he was to use your method could he use a helper state with changeanim2? He could have P2 in his custom state on the ground and spawn a helper of (the body laying there)<- edited in, got distracted at work.
I dont get why youre set on using an explode if it's causing problems. If you havent tried what Cyanide said, try it.
           
Last Edit: October 11, 2012, 05:26:59 am by Odb718
Re: P2 Custom state using P1 Explods?
#7  October 11, 2012, 05:20:52 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
No, the helper would enter state 0, not another custom state.

What i have suggested is the only global compatible method you could use. Explod using a known animation (5150, you don't need fancy changeanim2's for that) and then use the character itself as the portrait in a new custom state. You can do angledraw to resize them and all that. You can even call on 9000,0 instead and use their large portrait.

Nothing else will give you enough control over sprites as EVERYTHING other than changeanim2 will come from p2's .air and .cns files.


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: P2 Custom state using P1 Explods?
#8  October 11, 2012, 05:55:08 am
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
The problem isn't with the animation data. The problem is that none of he given required animation actions are a head position. Which is why Anim2  is needed to display a sprite such as 5002,0, 5012,0, 5032,0, or 5062,0. So of course using something like 5150 will not work in this case.

Well anyway. I think I've done with this topic.

"You must defeat my flaming
dragon punch to stand a chance."
Re: P2 Custom state using P1 Explods?
#9  October 11, 2012, 07:19:14 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Not listening.

5150 is an EXPLOD used to display your DEAD character. You can then custom state p2 as much as you want leaving the dead explod behind and having p2 in all the sprites and positions you want. At no point have i suggested otherwise.


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: P2 Custom state using P1 Explods?
#10  October 11, 2012, 08:31:24 pm
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
5150 is a  lie dead animation of the player. So how would that display correctly as a lose portrait on the win quote screen?

"You must defeat my flaming
dragon punch to stand a chance."
Re: P2 Custom state using P1 Explods?
#11  October 11, 2012, 09:35:58 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Your requirement is obviously for a custom win screen. Mugen 1.0's system won't let you do this at all so it's obviously custom. Therefore any control of p2 has to be through custom states (you can still do this provided state 5150 has been entered) As you have a custom win screen, you can take control of p2 and make him change to whatever animation you like.

Leaving an explod behind is me assuming you want p2's death to be seamless rather than suddenly disappearing.

If you want this to show up AFTER the fight like in 1.0 you can't do anything. If it's custom like i say then you can do whatever you want by entering an attack movetype and using targetstate.


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: P2 Custom state using P1 Explods?
#12  October 11, 2012, 09:49:16 pm
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
Long story short of this thread:

I just did like what happens in SvC Chaos with Red Arremer/Athena transformations for opponents compatibility with them in Mugen. Except instead of using Anim2, a large explod of them are being displayed.

Just think of it like that, if that helps with anything. :P

"You must defeat my flaming
dragon punch to stand a chance."
Re: P2 Custom state using P1 Explods?
#13  October 11, 2012, 09:54:44 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
And as the sprite you want is not always available so cannot be used as an explod i am giving you an alternative. If memory serves during that sort of thing you can still see the characters sprite. As an explod won't work (doesn't give you access to the anims) you think outside the box a little and swap over. Stop thinking of it as "must display explod" to "must display sprite" There is nothing stopping you from turning the character into a portrait.


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: P2 Custom state using P1 Explods?
#14  October 11, 2012, 10:42:16 pm
  • ****
    • Hungary
    • seravy.x10.mx/Wordpress
Quote
The problem is that none of he given required animation actions are a head position.
So, like, use the normal animation and add the head.pos constants to it so that it appears in that position? Explods do have a pos parameter. As long as the animation you use is anim 0 and the character does have properly set constants, it should work.
const(size.head.pos.y) and same for x.

The other option is to do what Cyanide says :
Player in anim 5150 (dead), explod2 with portrait. This is impossible, no explod2.
However,
Player in anim2 for portrait, expod with anim 5150 (dead). It doesn't matter which animation is the explod and which is the player because you are not using the player for anything except being displayed, just like you do with the explod. So you can swap the roles of the two.
Re: P2 Custom state using P1 Explods?
#15  October 12, 2012, 03:55:21 am
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
Well, there was actually a mention on the WIP topics page to have an option to NOT have the win quote display. So I guess for that would be to have what I am using now. :P

Action 9001 is the defeated portrait if one actually exists for the opponent.
Action 9005 is the alternative portrait that uses the 'sprite' of the character that gets upscaled to use as a portrait.

both actions are displayed as an Explod type.

If neither actions 9001 or 9005 exist in the opponent, the win quote won't display for when the match is over.

"You must defeat my flaming
dragon punch to stand a chance."
Re: P2 Custom state using P1 Explods?
#16  October 12, 2012, 04:04:13 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
We're giving you an option that would let 9005 work ALL THE TIME. Regardless of whether they had that animation or not.

Here look.

[Statedef Custom]
movetype = H
ctrl = 0

[state explod]
type = explod
trigger1 = time = 0
anim = 5150
bindtime = 1
removetime = -1

[state changeanim2]
type = changeanim2
trigger1 = time = 0
value = 9005

[state Angledraw]
type = angledraw
trigger1 = time >= 0
value = 2,2
posset etc etc etc

end.


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: P2 Custom state using P1 Explods?
#17  October 12, 2012, 05:32:33 am
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
We're giving you an option that would let 9005 work ALL THE TIME. Regardless of whether they had that animation or not.

Here look.

[Statedef Custom]
movetype = H
ctrl = 0

[state explod]
type = explod
trigger1 = time = 0
anim = 5150
bindtime = 1
removetime = -1

[state changeanim2]
type = changeanim2
trigger1 = time = 0
value = 9005

[state Angledraw]
type = angledraw
trigger1 = time >= 0
value = 2,2
posset etc etc etc

end.

Umm..... That code is saying to display the opponents lie dead animation as an explod, and to change the P2 (behind the screen, not visible) to anim2.

Are you saying that the explod 5150 will just automatically 'change' to 9005? That doesn't seem to make sense.

"You must defeat my flaming
dragon punch to stand a chance."
Re: P2 Custom state using P1 Explods?
#18  October 12, 2012, 05:58:19 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Why is p2 behind the screen? Why can't you see that this is a way to turn PLAYER TWO into the equivalent of an explod. Use sprpriority. Whatever. Player2 is only invisible cos you made him that way and did something to an explod. Think outside the explod box PLEASE. Stop thinking of it as displaying known sprite as explod and start thinking that you can display your "fancy yet still using required sprite animation" as the player itself. You could turn him into sprite 9000,0 ffs.

Also, displaying explod isn't needed at all, i am basing this purely on your comment about SNK intro's where the player is still visible while the big heads talk. If you don't have that effect you don't need the explod at all.


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: P2 Custom state using P1 Explods?
#19  October 12, 2012, 06:29:04 am
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
Both P1 and P2 are behind the screen. They're actually being turned invisible to be honest, as well as the no life bar display. Come to think of it, I think the entire black screen covers the area as well as the use of envcolor.

The only thing showing on screen is a black BG, with a portrait of the winner, and a portrait of the defeated opponent with the win quote below.
If you want to see where all this is coming from, see this.
http://mugenguild.com/forum/topics/m-bison-sfii-world-warrior-update-101012-v0-6a-beta-144476.60.html Right around pages 4 - 6.

Maybe this is where the confusion was? o_O

Also, this isn't SNK style, for whatever reason.

The other reason for comparability of users either using actions 9001 or 9005 is for the option. If they don't want the win screen displayed for whatever reason, they don't have to add the actions of the other characters air file.  That's why I mentioned earlier, it's sort of like a mach end transformation against either red, or athena.


"You must defeat my flaming
dragon punch to stand a chance."
Last Edit: October 12, 2012, 06:35:23 am by N-Mario
Re: P2 Custom state using P1 Explods?
#20  October 12, 2012, 08:24:45 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Red and Athena are both in an SNK game. That's what i based the comment off.

If you don't want the screen to show then you use a variable to decide if it's allowed to or not and supply a config file.

There is NO reason you have to use envcolor and an explod. Use BGpalFX. Turn your character invisible if you want but you don't need to turn p2 invisible to achieve this. Once more, think OUTSIDE the box. You've done it one way, you can do it a DIFFERENT way and achieve the same effect without having a pointless black BG if p2 decides not to have your special sprite.


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: P2 Custom state using P1 Explods?
#21  October 12, 2012, 07:03:29 pm
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
There's a problem with using a variable though. If the variable is off, that means it will never work. even with characters that have the existing action numbers. Though I think that was an original idea, but I decided against this. I want it to always work for opponents that have the animations. If the animations don't exist, it will not display the screen. This seems to work for every one.

Secondly. there's a reason why I DO need both black explod & envcolor.
If a get hit sprite is used for the opponent, I don't want any part of it to go over toward the winners portrait. The black explod is to cut off unnecessary parts. I can probably do another screen shot, with an envcolor using white instead, to show what's going on, to show why things are needed in the case.


"You must defeat my flaming
dragon punch to stand a chance."
Re: P2 Custom state using P1 Explods?
#22  October 12, 2012, 11:48:38 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
No you do NOT need envcolor.  Nor if you use my method does it HAVE to be an explod. You are ONLY required to use an explod BECAUSE you're using envcolor. Cos explod takes ontop which is the only way you can bypass envcolor. If you use bgpalfx, and turn things invisible and off, you can use the characters instead.

envcolor is pretty outdated now anyway and you should either use bgpalfx or allpalfx to achieve the same effects.


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: P2 Custom state using P1 Explods?
#23  October 13, 2012, 12:38:16 am
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
Saying envcolor is outdated is the same thing as saying type = gravity is outdated, and that i should use veladd y = 0.45 for the same effect. But the engine still uses these, as far as I know. :P



Wait........ why are we still going on this?
Spoiler, click to toggle visibilty

"You must defeat my flaming
dragon punch to stand a chance."
Last Edit: October 13, 2012, 12:41:50 am by N-Mario
Re: P2 Custom state using P1 Explods?
#24  October 13, 2012, 12:57:03 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Because we can improve it so p2 never just has this blank space?


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: P2 Custom state using P1 Explods?
New #25  October 13, 2012, 01:55:38 am
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
Umm..... The blank space will NEVER be displayed. Period......

It either displays the screen if an animation action exists, or it skips the entire win quote screen.

It will only display blank space if the user's defeated opponent purposely uses an animation action with a blank sprite # below the line, like "-1,-1, 0,0, 1".

"You must defeat my flaming
dragon punch to stand a chance."
Last Edit: October 13, 2012, 01:59:20 am by N-Mario