YesNoOk
avatar

Help with special move CPU falling animation (Read 825 times)

Started by mugenfan89, January 27, 2021, 04:13:19 pm
Share this topic:
Help with special move CPU falling animation
New #1  January 27, 2021, 04:13:19 pm
  • avatar
  • *
    • USA
I got another issue with a Special move, whenever I successfully perform the move when I hit the opponent it will usually show some unrelated falling animations of the CPU, instead of showing him falling it will show a stance animation, on some others the turn animation a few others a dizzy animation etc. I am not quite sure where the problem could lie. Any help is appreciated.

Here is the code :


;==================================
;-------------------
[Statedef 1300]; clock work
type    = S
movetype= A
physics = N
juggle  = 0
anim = 1300
Velset = 0, 0
sprpriority = 2
ctrl = 0

[State 620, 145]
type = varset
trigger1 = 1
v = 47
value = 0
ignorehitpause = 1

[State 8000, Power bloker]
type = Explod
trigger1 = time = 0
anim = 888
pos = 0,0
postype = p1
ID = 7080
sprpriority  = 1
removetime = 120
ignorehitpause = 1


[State 2000, 0.5]
type = Playsnd
trigger1 = animelem = 4
value = 20,3
channel = 0

[State 2000, 0.5]
type = Playsnd
trigger1 = animelem = 11 || animelem = 19
value = f5,155

[State 2000, 0.5]
type = Playsnd
trigger1 = animelem = 3
trigger1 = p2stateno != [120,159]
trigger1 = p2stateno != [1301,1302]
trigger1 = prevstateno != [200,221]
value = 4,11
channel = 3

[State 2000, 2]
type = Veladd
trigger1 = animelem = 3
x = 3

[State 2000, 2]
type = Velmul
trigger1 = animelemtime(24) > 0
x = 0.875

[State 2000, 2]
type = Veladd
trigger1 = moveguarded = 2
x = -1

[State 2000, 2]
type = changeanim
trigger1 = movehit = 2
value = 1301
elem = animelemno(0)
persistent = 0

[State ]
type = Hitdef
trigger1 = animelem = 6
trigger2 = animelem = 14
damage = 100,10
getpower = 0,0
givepower = 0,0
pausetime = 2,2
attr = S,NA
hitflag = MAF
guardflag = M
animtype = light
air.animtype = back
priority = 4, hit
sparkno = -1
guard.sparkno = -1
sparkxy = 0, 0
hitsound = 5,100
guardsound = 5,14
ground.type = high;low
air.type = high
ground.slidetime = 10
guard.slidetime = 24
ground.hittime = 17
guard.hittime = 24
ground.velocity = -1, 0
air.velocity = -2, -5
guard.velocity = -9.5
yaccel = .675
air.fall = 1
fall.recover = 0
fall.xvelocity = 0
fall.yvelocity = 0
p2facing = 1
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
envshake.freq = 90
envshake.time = 12
envshake.ampl = 4
forcestand = 1

[State 1050, 4]
type = HitDef
trigger1 = animelem = 22
attr = S, NA
damage    = 100,10
animtype  = back
air.animtype  = Back
hitflag = MAFD
guardflag = HL
priority = 7
pausetime = 0, 2
sparkno = -1
guard.sparkno = -1
sparkxy = 18,-60
hitsound   = s20,2
guardsound = 5,14
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
guard.velocity = 0
ground.velocity = -4,-5
air.velocity = -4,-5
yaccel = 0.75
guard.slidetime = 12              ;Values for guarded attack (def: ground.slidetime)
guard.ctrltime = 5               ;Time to regain control after guard (def: guard.slidetime)
guard.dist = 120
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
envshake.freq = 90
envshake.time = 16
envshake.ampl = 8
p2stateno = 1301
p2facing = 1

[State 2000, 0.5]
type = helper
trigger1 = movehit = 2
stateno = 27
;persistent = 0


[State 2000, 0.5]
type = Playsnd
trigger1 = movecontact
trigger1 = animelem = 7 || animelem = 15 || animelem = 23
value = 20,0
volumescale = 200

[State 2000, 0.5]
type = targetvelset
trigger1 = moveguarded = [1,24]
x = -2
ignorehitpause = 1

[State 181, DIED]
type = statetypeset
trigger1 = moveguarded > 12 || p2dist x < 0
trigger2 = animelemtime(8) > 0 && !movecontact
movetype = I

[State 1050, 7]
type = selfstate
trigger1 = animtime = 0
value = 0
ctrl = 1



[Statedef 1301]     ;struck by clock
type    = A
movetype= H
physics = N
sprpriority = 1
ctrl = 0
facep2 = 1


[State 820, 4351]
type = varadd
Trigger1 = time = 0
v = 20
value = ceil(gethitvar(damage)*100/lifemax)

[State 820, 4351]
type = varadd
Trigger1 = time = 0
v = 21
value = 1

[State -2, 34]
type = Playsnd
trigger1 = time = 2
value = 3,0 + 2*(random%2)
channel = 3

[State 10000, open]
type = selfstate
triggerall = time = 1
trigger1 = authorname = "boss"
value = 5050


[State 10000, open]
type = velset
trigger1 = time = 0
x = -4
y = -5

[State 10000, open]
type = posadd
trigger1 = time = 0
x = -20
y = -(pos y - var(57))/2

[state 0, p]
type = playerpush
trigger1 = 1
value = 0

[State 10000, open]
type = changeanim2
trigger1 = time = 1
value = 5070
elem = 2


[State 1000, 7]
type = veladd
trigger1 = 1
y = 0.75

[State 1000, 7]
type = changestate
trigger1 = time > 5 && pos y > var(57) && vel y > 0
value = 1302

[Statedef 1302]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 3
anim = 5170

[State -2, 34]
type = Posset
trigger1 = time = 0
y = var(57)

[State 820, 1]
type = changeanim
Trigger1 = Time = 4
value = 5110

[State -2, 34]
type = Playsnd
trigger1 = time = 0
value = f7,0
volumescale = 200

[State 820, 1]
type = envshake
Trigger1 = Time = 0
ampl = 6
freq = 70
time = 16

[State 820, 1]
type = veladd
Trigger1 = Time = 0
x = -4
y = -4

[State 820, 1]
type = veladd
Trigger1 = Time > 0
y = 0.5

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = time > 12 && pos y > var(57) && vel y > 0
value = 5110


     Posted: January 28, 2021, 03:56:22 pm
Come on nobody ?
I only want to know how to change the falling animation when the opponent falls after I strike him with my special move.
Please any help ?
Last Edit: January 28, 2021, 07:32:48 pm by mugenfan89