Códigos para Fighter Factory Mugen 2


ARTIFICIAL INTELIGENCE 

CNS:

[State -3]

type = ChangeState
triggerall = Ctrl
triggerall = Random <= 300
triggerall = var(6) = 1
triggerall = StateType = S
trigger3= stateno = 1500
triggerall = numproj = 0
trigger1 = p2movetype = I
value =100
[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 300
triggerall = var(6) = 1
triggerall = StateType = S
trigger3= stateno = 1500
triggerall = numproj = 0
trigger1 = p2movetype = I
value =105

type = ChangeState
triggerall = Ctrl
triggerall = Random <= 500
triggerall = var(6) = 1
triggerall = StateType = S
trigger3= stateno = 1500
triggerall = numproj = 0
trigger1 = p2movetype = I
value = 876

[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 500
triggerall = var(6) = 1
triggerall = StateType = S
trigger3= stateno = 1500
triggerall = numproj = 0
trigger1 = p2movetype = I
value =  877
[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 500
triggerall = var(6) = 1
triggerall = StateType = S
trigger3= stateno = 1500
triggerall = numproj = 1
trigger1 = p2movetype = I
value = 878
[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 500
triggerall = var(6) = 1
triggerall = StateType = S
triggerall = numproj = 0
trigger3= stateno = 1500
trigger1 = p2movetype = I
value =869

[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 500
triggerall = var(6) = 1
triggerall = StateType = S
triggerall = numproj = 0
trigger3= stateno = 1500
trigger1 = p2movetype = I
value = 865

[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 500
triggerall = var(6) = 1
triggerall = StateType = S
triggerall = numproj = 0
trigger3= stateno = 1500
trigger1 = p2movetype = I
value = 2010
[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 500
triggerall = var(6) = 1
triggerall = StateType = S
triggerall = numproj = 0
trigger3= stateno = 1500
trigger1 = p2movetype = I
value = 4999
[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 500
triggerall = var(6) = 1
triggerall = StateType = S
triggerall = numproj = 0
trigger3= stateno = 1500
trigger1 = p2movetype = I
value = 1728
[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 600
triggerall = var(6) = 1
triggerall = StateType = S
triggerall = numproj = 0
trigger3= stateno = 1500
trigger1 = p2movetype = I
value = 1996
[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 600
triggerall = var(6) = 1
triggerall = StateType = S
triggerall = numproj = 0
trigger3= stateno = 1500
trigger1 = p2movetype = I
value = 1998

[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <=700
triggerall = var(6) = 1
triggerall = StateType = S
triggerall = numproj = 0
trigger1 = p2movetype = I
value = 1999

[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 500
triggerall = var(6) = 1
triggerall = StateType = S
triggerall = numproj = 0
trigger1 = p2movetype = I
value = 2799
[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 500
triggerall = var(6) = 1
triggerall = StateType = S
triggerall = numproj = 0
trigger1 = p2movetype = I
value = 2999

[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 500
triggerall = var(6) = 1
triggerall = StateType = S
triggerall = numproj = 0
trigger1 = p2movetype = I
value = 3999
[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 500
triggerall = var(6) = 1
triggerall = StateType = S
triggerall = numproj = 0
trigger1 = p2movetype = I
value = 4999


[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 900
triggerall = var(6) = 1
triggerall = StateType = S
trigger3= stateno = 1500
triggerall = numproj = 0
trigger1 = p2movetype = I
value = 5999

[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 800
triggerall = var(6) = 1
triggerall = StateType = S
triggerall = numproj = 0
trigger3= stateno = 1500
trigger1 = p2movetype = I
value = 999

[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 1000
triggerall = var(6) = 1
triggerall = StateType = S
triggerall = numproj = 0
trigger3= stateno = 1500
trigger1 = p2movetype = I
value =998

[State -3]
type = ChangeState
triggerall = Ctrl
triggerall = Random <= 800
triggerall = var(6) = 1
triggerall = StateType = S
triggerall = numproj = 0
trigger3= stateno = 1500
trigger1 = p2movetype = I
value = 997


CMD:

[Command]
name = "IA1"
command = D, DF, F, b,a
time = 1
[Command]
name = "IA2"
command = D, DF, F, b,a+b
time = 1
[Command]
name = "IA3"
command = D, DF, F, c,a+b+c
time = 1
[Command]
name = "IA4"
command = D, DF, F, x,a+b+c+z
time = 1
[Command]
name = "IA5"
command = D, DF, F, x,a+b+c+z+x
time = 1
[Command]
name = "IA6"
command = D, DF, F, b,a+b+c+z+x+y
time = 1
[Command]
name = "IA7"
command = D, DF, F, b,a+b+c+z+x+y+U
time = 1
[Command]
name = "IA8"
command = D, DF, F, c,a+b+c+z+x+y+U+D
time = 1
[Command]
name = "IA9"
command = D, DF, F, x,a+b+c+z+x+y+U+D+F
time = 1
[Command]
name = "IA10"
command = D, DF, F, x
time = 1
[Command]
name = "IA11"
command = D, DF, F, b
time = 1
[Command]
name = "IA12"
command = D, DF, F, b
time = 1
[Command]
name = "IA13"
command = D, DF, F, c,D, DF, F
time = 1
[Command]
name = "IA14"
command = D, DF, F ,D, DF, F
time = 1
[Command]
name = "IA15"
command = D, DF, F, x,a+b+c+z+x+y+U+D+F
time = 1
[Command]
name = "IA16"
command = D, DF, F, b,a+b+c+z+x+y+U+D
time = 1
[Command]
name = "IA17"
command = D, DF, F, b,a+b+c+z+x+y+U
time = 1
[Command]
name = "IA18"
command = D, DF, F, c,a+b+c+z+x+y
time = 1
[Command]
name = "IA19"
command = D, DF, F, x,a+b+c+z+x
time = 1
[Command]
name = "IA20"
command = D, DF, F, x,a+b+c+z
time = 1
[Command]
name = "IA21"
command = D, DF, F, b,a+b+c
time = 1
[Command]
name = "IA22"
command = D, DF, F, b,a+b
time = 1
[Command]
name = "IA23"
command = D, DF, F, c,a+b+c+x+y+U+D+F+B
time = 1
[Command]
name = "IA24"
command = D, DF, F, x,a+c+z+x+y+U+D+F+B
time = 1
[Command]
name = "IA25"
command = D, DF, F, x,a+b+c+z+x+y+U+D+F+B
time = 1
[Command]
name = "IA26"
command = D, DF, F, b,a+b+c+z+x+y+U+F+B
time = 1
[Command]
name = "IA27"
command = D, DF, F, b,a+b+c+x+y+U+D+F
time = 1
[Command]
name = "IA28"
command = D, DF, F, c,a+b+c+z+x+y+F+B
time = 1
[Command]
name = "IA29"
command = D, DF, F, x,a+b+x+y+U+D+F+B
time = 1
[Command]
name = "IA30"
command = D, DF, F, x,b+c+z+x+y+U+D+F+B
time = 1


[State -1]
type = varset
triggerall = var(6) != 1
trigger1 = command = "IA1"
trigger2 = command = "IA2"
trigger3 = command = "IA3"
trigger4 = command = "IA4"
trigger5 = command = "IA5"
trigger6 = command = "IA6"
trigger7 = command = "IA7"
trigger8 = command = "IA8"
trigger9 = command = "IA9"
trigger10 = command = "IA10"
trigger11 = command = "IA11"
trigger12 = command = "IA12"
trigger13 = command = "IA13"
trigger14 = command = "IA14"
trigger15 = command = "IA15"
trigger16 = command = "IA16"
trigger17= command = "IA17"
trigger18= command = "IA18"
trigger19= command = "IA19"
trigger20= command = "IA20"
trigger21 = command = "IA21"
trigger22 = command = "IA22"
trigger23 = command = "IA23"
trigger24 = command = "IA24"
trigger25 = command = "IA25"
trigger26 = command = "IA26"
trigger27 = command = "IA27"
trigger28 = command = "IA28"
trigger29 = command = "IA29"
trigger30 = command = "IA30"
trigger3= stateno = 1500
v = 6
value = 1


RESSURREIÇÃO 

[State -3, Helper]
type = Helper
trigger1 = (RoundState = 2) && (NumHelper(9000) = 0)
helpertype = Player
name = "Resurrection Super"
id = 9000
postype = p1
stateno = 9000
ignorehitpause = 1
pausemovetime = 999999999999999999999
size.ground.back = 1
size.ground.front = 1
size.air.back = 1
size.air.front = 1
 
Next, you have to override State 5150. If your character uses its own common states
file, then add the two states to State 5150 (the two states are numbered 10 and 11):
 
; HIT_LIEDEAD
[Statedef 5150]
type = L
movetype= H
physics = N
sprpriority = -3
 
[State 5150, 1] ;Normal anim
type = ChangeAnim
triggerall = Time = 0
triggerall = SelfAnimExist(5140)
trigger1 = (anim != [5111,5119]) && (anim != [5171,5179])
trigger2 = !SelfAnimExist(5140 + (anim % 10))
value = 5140
 
[State 5150, 3] ;Hit up type anim
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (anim = [5111,5119]) || (anim = [5171,5179])
trigger1 = SelfAnimExist(5140 + (anim % 10))
value = 5140 + (anim % 10)
 
[State 5150, 4] ;Match over anim
type = ChangeAnim
persistent = 0
;trigger1 = Time = 0
trigger1 = MatchOver = 1
trigger1 = Anim = [5140,5149]
trigger1 = SelfAnimExist(anim+10)
value = anim+10
 
[State 5150, 5] ;Switch to 5110 if liedead anim does not exist
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Anim != [5140,5159]
trigger1 = Anim != [5110,5119]
value = 5110
 
[State 5150, 6] ;Friction
type = VelMul
trigger1 = 1
x = 0.85
 
[State 5150, 7] ;Friction
type = VelSet
trigger1 = Vel x < .05
persistent = 0
x = 0
 
[State 5150, 9]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
 
[State 5150, 10]
type = ChangeState
trigger1 = Life > 0
value = 5120
 
[State 5150, 11]
type = ChangeState
trigger1 = (Life <= 0) && (Var(0) = 0) && (NumHelper(9000) > 0) && (Power >= 1000)
value = 9000
 
Now, add this to your AIR file. If you change the action number, make sure to
change it in the Resurrection super states:
 
;Used for projectiles...
[Begin Action 9010]
Clsn2: 1
Clsn2[0] = -23,-640, 19, 0
0,-1, 0,0, -1
 
The Resurrection super states:
 
;===================
; Resurrection Super
;===================
 
[Statedef 9000]
type = S
movetype = I
velset = 0,0
anim = 0
ctrl = 0
poweradd = -1000 
sprpriority = 2
 
This var keeps the Resurrection Super from being used twice in the same round.
[State 9000, VarSet]
type = VarSet
trigger1 = Time = 0
v = 0
value = 1
 
This NotHitby allows the player to recover at least 10% of their life.
The formula used in the trigger goes like this:
 
life * 10% / 5 (value used in the lifeadd) * 2 (value that is "modding" the time in the lifeadd)
 
[State 9000, NotHitBy]
type = NotHitBy
trigger1 = Time <= const(data.life) * 0.10 / 5 * 2
;trigger1 = life >= const(data.life) * 0.10 ;An alternate trigger
value = SCA
 
[State 9000, Width]
type = Width
trigger1 = 1
player = 45
 
; The reverse vacuum pushes the player away.
[State 9000, Reverse Vacuum]
type = Helper
trigger1 = (Time%3) = 0
name = "Reverse Vacuum"
pos = 0, 0
postype = p1
stateno = 9015
helpertype = normal
facing = 1 ;ifelse(random >= 500, 1, -1)
ignorehitpause = 1
size.ground.back = 1
size.ground.front = 1
size.air.back = 1
size.air.front = 1
 
[State 9000, Reverse Vacuum]
type = Helper
trigger1 = (Time%3) = 0
name = "Reverse Vacuum"
pos = 0, 0
postype = p1
stateno = 9015
helpertype = normal
facing = -1 ;ifelse(random >= 500, 1, -1)
ignorehitpause = 1
size.ground.back = 1
size.ground.front = 1
size.air.back = 1
size.air.front = 1
 
[State 9000, LifeAdd]
type = LifeAdd
trigger1 = (Time%2) = 0
value = 5
 
; This "invisible" projectile will "slow down" any projectiles. Thanks to [E] for the suggestion.
[State 9000, Projectile]
type = Projectile
trigger1 = (Time&25) = 0
projanim = 9010
offset = 0,0
velocity = 1, 0 
projpriority = 1
projremovetime = 25
; HitDef part of projectile info
attr = S, HP
sparkno = -1
guard.sparkno = -1
 
[State 9000, ChangeState]
type = ChangeState
trigger1 = life = const(data.life)
value = 0
ctrl = 1
 
;===========================
; Resurrection Helper States
;===========================
 
[Statedef 9010]
 
[State 9010, Invisible]
type = AssertSpecial
trigger1 = 1
flag = invisible
 
[State 9010, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
 
[State 9010, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
 
[State 9010, Bind]
type = BindToParent
trigger1 = 1
 
[State 9010, DestroySelf]
type = DestroySelf
triggerall = parent, life <= 0
trigger1 = (parent, power < 1000) || (parent, var(0) = 1)
 
;===============
; Reverse Vacuum
;===============
 
[Statedef 9015]
;type = A
anim = 9015
 
[State 9015, VarRandom]
type = VarRandom
trigger1 = Time = 0
v = 8
range = 1,5
 
[State 9015, VelSet]
type = VelSet
trigger1 = Time = 0
x = 5 * (3 * var() + 10 ;30 
 
[State 4015, PlayerPush]
type = PlayerPush
trigger1 = p2bodydist X >= 1
value = 1
 
[State 9015, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
 
[State 9015, DestoySelf]
type = DestroySelf
trigger1 = Time > 20

K.O ESPECIAL

;Special KO Effect 
[State -2: VarSet]
type = VarSet
trigger1 = !WinKO
v = 0
value = 0
ignorehitpause = 1
 
;Special KO Effect Switch ON
[State -2: VarSet]
type = VarSet
trigger1 = (WinKO) && (Var(0) = 0) && (StateNo >= 700) ;Adjust as you wish.
v = 0
value = 1
ignorehitpause = 1
 
;Special KO Effect timer. (To prevent repetiveness)
[State -2: VarAdd]
type = VarAdd
trigger1 = Var(0) > 0
v = 0
value = 1
ignorehitpause = 1
 
This is one example of how a special KO effect can be done. 
 
;Remove life bars during effects.
[State -2: AssertSpecial]
type = AssertSpecial
trigger1 = (Var(0) = 1) && (StateNo >= 700) ;Adjust as you wish.
flag = NoBarDisplay
flag2 = NoFG
ignorehitpause= 1
 
;The effect itself
[State -2: Explod]
type = Explod
trigger1 = (Var(0) = 2) && (NumExplod(9000) = 0) && (StateNo >= 700) ;Adjust as you wish.
id = 9000
ignorehitpause = 1

CARREGAR PROJECTILE

1.) In your character's charging state, have a VarSet AND a VarAdd. Example:
 
;Charge reset at the beginning.
[State 9000, VarSet]
type = VarSet
trigger1 = Time = 0
var(0) = 0
 
;Charge addition when holding the button.
[State 9000, VarAdd]
type = VarAdd
trigger1 = Time > 0
var(0) = 1
 
2.) Have several changestate parameters. Each with a different var trigger. The higher the variable's value, the more powerful the attack should be. Examples:
 
[State 9000, 1]
type = ChangeState
triggerall = command != "holdx" ;When you release the button.
trigger1 = var(0) <= 20 ;Held the button for less than 20 ticks.
value = * ;Weak projectile state
 
[State 9000, 2]
type = ChangeState
triggerall = command != "holdx" ;When you release the button.
trigger1 = var(0) = [21,40] ;Held the button between 21 and 40 ticks.
value = * ;Medium projectile state

tags:codigos,codigos mugen, tutorial mugen, tutoriais mugen, fighter factory, como fazer um char voar, como fazer um char carregar energia, charge, chars,programação de chars, codigos fighter factory, codigos mugen,