The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => Topic started by: Shulk on December 25, 2014, 11:43:38 pm

Title: Character "exploding" during KO?
Post by: Shulk on December 25, 2014, 11:43:38 pm
I have a character in the makingv from my game in the making that is REQUIRED by THE GAME'S STANDARDS THAT EVERY CHARACTER IN THE GAME MUST EXPLODE WHEN DED. But seriously, I tried. I got it to work once, but it only happens when lying down. I want it to happen straight away when the character gets defeated. Like in Smash bros when you fall off  the bounderies. For this, it's  only when their health reaches 0.

     Posted: December 26, 2014, 03:18:51 am
No? Ok.
Title: Re: Character "exploding" during KO?
Post by: ELECTR0 on December 26, 2014, 03:54:58 am
Bellow your [statedef -2] you need to add a changestate to a custom state when your characters life hits zero and the match is over. So use these triggers for your chagestate :

trigger1 =life=0
trigger1=MatchOver

In the changestate you want to make the player anim invisible and also spawn an explod and sound effect for the blow up. You also need to add a screenbound and a PosSet :

[State 0, ScreenBound]   ;so the camera won't follow the invisible player
type = ScreenBound
trigger1 = time >=0
value = 0
movecamera = 0,0
ignorehitpause = 1

[State 0, PosSet]  ;Set the character way below the floor so when they go to there statedef 5150 they
                            ;won't reappear on screen.
type = PosSet
trigger1 = time = 3
y = 800
ignorehitpause = 1

[State 0, ChangeState]  ;After everything has triggered in the explosion effect your character goes to his
                                     ;normal lie dead state.
type = ChangeState
trigger1 = time = 5
value = 5150
ctrl = 1
ignorehitpause = 1
Title: Re: Character "exploding" during KO?
Post by: Shulk on December 26, 2014, 04:55:20 am
She just stands there when she gets defeated by F1. When I defeat her without F1, nothing different happens.
Title: Re: Character "exploding" during KO?
Post by: ELECTR0 on December 26, 2014, 06:31:46 am
Paste your code of what you have so far.
Title: Re: Character "exploding" during KO?
Post by: XGargoyle on December 26, 2014, 01:12:05 pm
Electro's code is basically for the player to go to a custom state after being defeated. I believe the OP is asking for the opposite, put the enemy into a custom state and have him explode after being KO'd.

To place the enemy in a custom state when he's KO'd, you will need to hit the enemy with a projectile in the same instant he's defeated. The projectile will put the enemy into a custom state of yours where you can do anything to him.
Title: Re: Character "exploding" during KO?
Post by: Duos on December 26, 2014, 01:21:59 pm
You may want to go into more detail on your problem if you can.  Are you trying to do something like Megaman and Strider being KOed in Marvel where they disintegrate?  Or more like what Gargoyle said?  If you're doing a fullgame couldn't you just program it like the former or would that present problems?
Title: Re: Character "exploding" during KO?
Post by: Shulk on December 26, 2014, 03:11:04 pm
I want the character herself to explode. Not anyone else to , and
[statedef -2]
[State -2, ChangeState]
type = ChangeState
trigger1=life=0
trigger1=MatchOver
value = 6666666666666666666666666
ctrl = 0
;anim =
;ignorehitpause =
;persistent =
 

;----------------------------
[Statedef 6666666666666666666666666]
type    = S
movetype= I
physics = N
anim = 9741
ctrl = 0


[State 6666666666666666666666666, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 2
freq = 60
ampl = -4
phase = 90
;ignorehitpause =
;persistent =
[State 6666666666666666666666666, ScreenBound]   ;so the camera won't follow the invisible player
type = ScreenBound
trigger1 = time >=0
value = 0
movecamera = 0,0
ignorehitpause = 1

[State 6666666666666666666666666, PosSet]  ;Set the character way below the floor so when they go to there statedef 5150 they
                            ;won't reappear on screen.
type = PosSet
trigger1 = time = 3
y = 800
ignorehitpause = 1