YesNoOk
avatar

Make p2 disappear after defeating them with a certain move(Not for beginners). (Read 1808 times)

Started by DBZAOTA482, September 25, 2011, 05:01:20 am
Share this topic:
Make p2 disappear after defeating them with a certain move(Not for beginners).
#1  September 25, 2011, 05:01:20 am
  • *
    • dbzaota482.webs.com/
Have you always wondered how some characters have a certain move that makes the opponent go boom(ex. My Vegeta's Final Flash)? Well if so, here is a step-by-step tutorial on how to achieve this.

Quote
Requirments:
1. A custom made gethit stateno.
2. A custom made common.cns file.

Steps


1. Go to the "HitDef" state for the move's statedef in which your character has in it's constants that is supposed to make p2 disappear if defeat and be sure you have a little function called "p2stateno" implanted into it.

Quote
[State ****]
type = HitDef
trigger1 = Time = 0
attr = S, SP
damage =  ***,***
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 5, Hit
pausetime = 1, 1
sparkno = -1
guard.sparkno = -1
sparkxy = 0, 0
hitsound = -1
guardsound = -1
getpower = 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = 0
airguard.velocity = 0
air.type = High
air.velocity = 0
air.hittime = 12
p2stateno = 1111600



2. "p2stateno" is a function that allows your character to put p2 in a custom made gethit stateno, it can be any number you want.

Quote
[Statedef 1111600]
type    = S
movetype= H
physics = N
velset = 0,0
sprpriority = -1

[State 3052, p2] ;The animation for p2 from your character's AIR file
type = ChangeAnim2
Trigger1 = Time = 0
value =1111600

[State 0, PosSet]
type = PosSet
trigger1 = !alive;A function that triggers state if p2 has been K.O'd
y = 0

[State 3000, 5]
type = ChangeState
trigger1 = !alive ;A function that triggers state if p2 has been K.O'd
value = 5150

[State 3000, 5]
type = SelfState
trigger1 = alive = 1 ;A function that triggers state if p2 still has life
value = 5050

3. The coding above is an example of a gethit stateno, adding a changestate of "value = 5150" would be much needed to make p2 disappear.


4. Go into your custom made common.cns and add the following codings in stateno 5150 :


Quote
[State 0, AssertSpecial]            ;To give an illusion that p2 went boom
type = AssertSpecial
trigger1 = prevstateno= 1111600 ;A function that indicates if the stateno for the custom gethit was the previous stateno p2 was in.
trigger1 = 1
flag = invisible

[State 0, PlayerPush];So if any player who moves around the map does bump into an invisible path
type = PlayerPush
trigger1 = prevstateno= 1111600
trigger1 = 1
value = 0
;ignorehitpause =
;persistent =

[State 0, ScreenBound] ;To keep the camera from panning to p2
type = ScreenBound
trigger1= prevstateno= 1111600
trigger1 = 1
value = 0
movecamera = 0,0
;ignorehitpause =
;persistent =

Test that bad boy out and bam, the move will definetly make p2 go boom(if defeat). ;D

Feedback will be much appriciated. :)


The apocalypse promised dbz creations leading to the cell games

#1 rule for making a good M.U.G.E.N creation:

Have fun while making it; find inspiration, and push limits
Last Edit: September 25, 2011, 05:14:30 am by DBZAOTA482

2OS

Re: Make p2 disappear after defeating them with a certain move(Not for Beginners).
#2  September 25, 2011, 05:15:38 am
  • ****
  • Ich schicke dich zur HOELLE ! ¡ ! ¡
    • Egypt
    • deuceovspadez.webs.com/
1. p2stateno should only be used for throws ( minus the sctrl ""projectile"" where it ""works"" regardless ), use targetstate with the trigger movehit instead, it is a state controller like changestate and selfstate.

2. A custom common.cns is in no way needed whatsoever. Just that one state you can put in your own .CNS which will ""override"" the common.


Other than that yaa, that's it, it's fine.

And a better place for this is ""Tips, Tricks, Tutorials"" in Development HELP, not Development Discussion.


[ 052012 ] Inazumachi 181/256  /  deviantART   /  2OS Grafphicsxz  Dead Anims ( Orochi/Mizuchi )  /  608's FX Volume 3
Re: Make p2 disappear after defeating them with a certain move(Not for beginners).
#3  September 25, 2011, 05:34:46 am
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
Like said, don't edit the common1.cns for this. Just send the opponent off the screen. To be honest, all you need to do is send your opponent to one custom state, like so:

[mcode]
[Statedef 65536]
type=A
movetype=H
physics=N
ctrl=0
velset=0,0
sprpriority=-1

[state 65536,posset]
type=posset
trigger1=!time
y=9999999999999999999

[state 65536,selfstate]
type=selfstate
trigger1=!time
value=5150-(100*(alive))
ctrl=0[/mcode]
Re: Make p2 disappear after defeating them with a certain move(Not for beginners).
#4  October 18, 2011, 12:10:01 am
  • ****
    • Hungary
    • seravy.x10.mx/Wordpress
However, relying on Selfstate into 5150 is risky as it might be custom and contain a posset for example that makes the character appear again.
Nice idea to use your own 5150 for it, I'm going to use this in one of my characters. I always hated to wait however long I have to just because Mugen doesn't proceed to the end of the round if the opponent is not in 5150.