JustNoPoint Forum
May 19, 2013, 11:32:57 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Members Login Register  
Pages: [1]
  Print  
Author Topic: Cheap KO  (Read 1101 times)
LaQuak
ﺝﮗ Oriental Lord
Administrator
*****
Offline Offline

Posts: 903



View Profile WWW Email
« on: October 15, 2008, 01:14:14 PM »

This quick procedure will make your character go into a cheap ko animation/state if your character is almost dead, blocks and still recieves "chip" damage from moves. Mainly chip damage is that tiny amount of damage that takes maximum life from your lifebar. It's usualy in special and super moves but some normal attacks can still do chip damage if the creator wants it to. Implementing a cheap ko for your character is nothing but a cosmetic but it is worth having it for dramatic like purpose when you die.

So lets begin by going to .AIR (Animations) and making a new animations and labeling the Action No. 5950. After that find your cheap ko sprites and simply add them in and set the time in ticks. If you dont have cheap ko sprites you can use your get hit/requiered sprites for standing get hits (groups 5000-5010) and ending it with falling down looking sprites (group 5040). Remeber how many frames you have in your cheap ko animation because you will need to use the last animation frame in .CNS.

Then go to your .CNS (Constants) and make State 5950 like:

Code:
; Cheap KO
[Statedef 5950] <- Cheap KO state.
movetype = H
physics = S
ctrl = 0 <- Without control so you cant do anything.
velset = 0,0
anim = 5950 <- Cheap KO animation in .AIR

[State 5950, NotHitBy]  <- This is here because you dont need to get hit after your KOed.
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 5950, PosSet] <- I put this here so my character doesn't move.
type = PosSet
trigger1 = 1
y = 0

[State 5950, PosAdd] <- I also put this here because sometimes with animations you may need to smooth out your sprites positioning so it looks smooth.
type = PosAdd
trigger1 = AnimElem = 16
x = -25

[State 5950, Voice] <- The dramatic "sigh" of death sound.
type = PlaySnd
trigger1 = AnimElem = 4
value = S5950, 0

[State 5950, Drop Sound] <- Droping to the floor slaming sound.
type = PlaySnd
trigger1 = AnimElem = 8
value = S12, 0

[State 5950, ChangeState] <- This is what you need to go into 5150 which is a Lie Dead animation so Mugen registers this as a KO and continues.
type = ChangeState
trigger1 = Animelem = # <- This is the last animation frame in .AIR so if you have 6 then its 6 if, 15 then 15.
value = 5150 <- Lie Dead animation. (Common)

That is your Cheap KO state now we need to tell Mugen and your character that you need to be in blocking (as that is how Cheap KO's work) for this state to activate so lets go to your Statedef -3 and make this:

Code:
; Cheap KO
[State -3, Cheap KO Collapse] <- This is where you collapse to the floor.
type = ChangeState <- This will change your state from the next 2 triggers.
trigger1 = !Alive&&(StateNo = [5000,5010]) <- This tells to go to cheap KO will when your not alive and in your gethit states after being hit ofcourse.
trigger1 = (PrevStateNo = [120,121])||(PrevStateNo = [130,131]) <- This tells to go to cheap KO when you're in blocking states.
value = 5950 <- And this tells it to go to Cheap KO state and then go to Lie Dead state.

Next we need to tell your character to play the appropriate sound when you die normaly and when you die by cheap ko. Go to your .SND and put your regular death sound in group 11/1 and cheap ko death sound in group 5950/0 and then go back to .CNS and go to your Statedef -2 and make:

Code:
[State -2, KO Sound Variable] <- We will be setting up a variable for death sounds and cheap ko death sounds. I use variable 10 you can use other.
type = VarSet
trigger1 = Alive&&var(10) > 0
trigger2= !Alive&&var(10) < 2
var(10) = IfElse(Alive,0,var(10)+1) <- Will be IfElsing from chosing when youre alive and variable is at its value to play the appropriate sound.
ignorehitpause = 1

[State -2, KO Sound] <- Actual PlaySnd sctrl.
type = PlaySnd
trigger1 = !Alive&&Var(10) = 1
trigger1 = Var(10):=2
value = 11,IfElse(StateNo = 5950,2,1) <- If you are not in statedef 5950 this will play normal death sound, Else you are in 5950 and play cheap ko sound.
ignorehitpause = 1

Enjoy
« Last Edit: October 15, 2008, 01:29:06 PM by LaQuak » Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!