;ESTADO DEL HELPER
;CLON DE ARENA [Statedef 16001] ; cuando aparece
type = S
physics = S
sprpriority = 0
[State 0, AssertSpecial]
type = AssertSpecial
Trigger1 = 1
Trigger2 = !time
flag = invisible
[State 0, Explod] ;opsional
type = Explod
trigger1 = !time
anim = 240
ID = 240
pos = -2,0
postype = p1 ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 2
ontop = 1
ownpal = 1
removeongethit = 0
[State 0, PalFX] ; para que se vea de color de arena (opsional)
type = PalFX
trigger1 = !time
time = -1
add = 90,90,50
mul = 222,203,191
sinadd = 0,0,0,1
invertall = 0
color = 0
[State 0, VarSet] ; esto es lo que le da la vida
type = VarSet
trigger1 = !time
v = 29 ;fv = 10
value = 70 ; tiene 70 de vida (valor recomendado para clones)
[State 0, Changestate]
type = Changestate
trigger1 = time = 12
value = 16000
[Statedef 16000] ; estado cuando esta de pie
type = S
physics = S
sprpriority = 0
[State 0, Changestate] ; cambiar al estado de muerte cuando ganas o perdes
type = Changestate
trigger1 = root, life = 0
trigger2 = p2life = 0
value = 16011
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0
[State 0, HitOverride] ; para que cambie al estado donde lo golean
type = HitOverride
trigger1 = time = 0
attr = SCA, NT, ST, HT, NA, SA, HA,NP,SP,HP
stateno = 16009
time = -1
[State 0, ChangeAnim] ; para que tenga la animacion quieto
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0
[State 0, VelSet]
type = VelSet
trigger1 = Time = 0
y = 0
[State 0, VelSet] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
[State 0, Turn]
type = Turn
trigger1 = p2bodydist x <=-20
;--|Changestates|----esto es para que ataque,y se mueva------------------
[State 0, Combo] ; combo
type = ChangeState
trigger1 = p2bodydist x < 20
trigger1 = random >= 100
value = 16200
ctrl = 1
[State 0, Walk] ; caminar
type = ChangeState
triggerall = p2movetype != H
trigger1 = p2bodydist x > 10
trigger1 = random < 100
value = 16020
ctrl = 1
[State 0, Run] ; correr
type = ChangeState
triggerall = p2bodydist x > 100
triggerall = p2movetype != H
trigger1 = random < 150
value = 16100
ctrl = 1
[State 0, golpe] ; golpe simple
type = ChangeState
triggerall = p2bodydist x = 21
trigger1 = random >= 100
value = 16220
ctrl = 1
[State 0, Die when lose] ; muere
type = Changestate
trigger1 = parent, life = 0
value = 16009
[State 0, Die when win] ; muere 2
type = Changestate
trigger1 = p2life = 0 && Numenemy = 0
trigger2 = Numenemy = 0
value = 16009
;-----------------------------------------------------------------------
;---------------CAMINANDO-----------------------
[Statedef 16020]
type = S
physics = S
sprpriority = 0
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0
[State 20, 1]
type = VelSet
trigger1 = 1
x = const(velocity.walk.fwd.x)
[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 5
value = S100,0
volume = 800
[State 0, ChangeState]
type = ChangeState
trigger1 = p2bodydist x < 24
value = 16000
ctrl = 1
[State 0, Die when win]
type = Changestate
trigger1 = p2life = 0 && Numenemy = 0
trigger2 = Numenemy = 0
value = 16009
;-----------------------------------------------------------------------
;---------------CAMINANDO hacia atras-----------------------
[Statedef 16021]
type = S
physics = S
sprpriority = 0
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21
[State 20, 2]
type = VelSet
trigger1 = 1
x = const(velocity.walk.back.x)
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 5
value = S100,0
volume = 800
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0
[State 0, ChangeState]
type = ChangeState
trigger1 = time > 80
value = 16000
ctrl = 1
[State 0, Die when win]
type = Changestate
trigger1 = p2life = 0 && Numenemy = 0
trigger2 = Numenemy = 0
value = 16009
;--------------------------------------------------------------------
;---------------Corriendo-----------------------
[Statedef 16100]
type = S
physics = S
anim = 100
sprpriority = 1
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0
[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
trigger2 = animelem = 4
value = S40,0
volume = 800
[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn
[State 100, 4]
type = ChangeState
trigger1 = time > 80
trigger2 = p2dist x <= 25
value = 16000
[State 0, Die when win]
type = Changestate
trigger1 = p2life = 0 && Numenemy = 0
trigger2 = Numenemy = 0
value = 16009
;---------------------------------------------------------------------------
; GOLPE SIMPLE
[Statedef 16200]
type = S
movetype= A
physics = S
juggle = 1
velset = 0,0
ctrl = 0
anim = 200
poweradd = 20
sprpriority = 2
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 5
value = 14,0
volume = 800
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 15,ifelse(random < 500,14,22)
volume = 800
[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 20, 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
sparkno = 0
sparkxy = -7, -33
hitsound = s14, 1
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime = 12
ground.velocity = -0.5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -0.5
air.hittime = 12
[State 200, 5]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = prevstateno != 16200
value = 16200
ctrl = 0
[State 200, 5]
type = ChangeState
trigger1 = AnimTime = 0
trigger1 = prevstateno = 16200
value = 16220
ctrl = 0
[State 0, Die when win]
type = Changestate
trigger1 = p2life = 0 && Numenemy = 0
trigger2 = Numenemy = 0
value = 16009
;---------------------------------------------------------------------------
; GOLPE MEDIO
[Statedef 16210]
type = S
movetype= A
physics = S
juggle = 4
poweradd= 30
ctrl = 0
velset = 0,0
anim = 210
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0
[State 0, ChangeState]
type = ChangeState
trigger1 = movehit
Trigger2 = random < 200
value = 16220
ctrl = 0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 15,ifelse(random < 500,17,23)
volume = 800
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 6
value = 14,0
volume = 800
[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 20, 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
sparkno = 1
sparkxy = -7, -40
hitsound = s14, 1
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime = 12
ground.velocity = -0.5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -0.5
air.hittime = 12
[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 16000
ctrl = 1
[State 0, Die when win]
type = Changestate
trigger1 = p2life = 0 && Numenemy = 0
trigger2 = Numenemy = 0
value = 16009
;---------------------------------------------------------------------------
; GOLPE FUERTE
;
[Statedef 16220]
type = S
movetype= A
physics = S
juggle = 4
poweradd= 60
ctrl = 0
velset = 0,0
anim = 220
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 15,9
volume = 800
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 10
value = 14,0
volume = 800
[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 20, 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 8
sparkno = s6000
sparkxy = -2, -10
hitsound = s14, 2
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime = 12
ground.velocity = -5,-4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -5,-4
air.hittime = 12
fall = 0
[State 220, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 16000
[State 0, Die when win]
type = Changestate
trigger1 = p2life = 0 && Numenemy = 0
trigger2 = Numenemy = 0
value = 16009
;---------------------------------------------------------------------------
; CUANDO ES GOLPEADO
[StateDef 16009]
type = S
movetype= A
physics = S
juggle = 1
velset = 0,0
ctrl = 0
anim = 5000
poweradd = 0
sprpriority = 2
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0
[State 0, VarAdd]
type = VarAdd
trigger1 = !time
v = 29 ;fv =
value = -gethitvar(damage)
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1
[State 15008, end]
type = changestate
trigger1 = time = 12
value = Ifelse(var(29) <= 0,16011,16000)
ctrl = 1
; CUANDO MUERE
[StateDef 16011]
type = S
movetype= A
physics = S
juggle = 1
velset = 0,0
ctrl = 0
anim = 853
poweradd = 0
sprpriority = 2
[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;--------------------------------------------------------------------------------------