YesNoOk
avatar

Plasma Beam Hit Makes The Opponent Temporarily Flicker (Read 1344 times)

Started by Ki$@1st456v, August 17, 2021, 11:20:27 PM
Share this topic:
Plasma Beam Hit Makes The Opponent Temporarily Flicker
#1  August 17, 2021, 11:20:27 PM
  • avatar
  • **
    • USA
Hi, everyone! I have been using Shinzankuro's Lilith and I have coded her with the Plasma Beam attack. However, when it hits the opponent they temporarily flicker. I have the coding for the move below. What animation or code am I missing that causes that skip in animation?

; Plasma Beam
[StateDef 3300]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3300
poweradd = 80
sprpriority = 2

[State 0, VarSet]
type = VarSet
trigger1= !time && var(59)<=0
var(10) = ifelse(command="QCF_B",2,ifelse(command="QCF_C",1,0))

[State 1000, VarSet]
type=varset
trigger1= !time && var(59)>=1
var(10)= ifelse((p2movetype=H || random<500), 2, ifelse(random<500, 1, 0))

[State G-FX, Move Dust]
type = Explod
trigger1 = time = 0
anim = 8300
id = 8300
supermove = 1
sprpriority = 4
scale = 0.5,0.5
ownpal = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 8
value = 3,2
volume = 255
volumescale = 255
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 8
value = 4,6
volume = 255
volumescale = 255

[State 0, Helper]
type = Helper
triggerall = numhelper(3300)=0
trigger1 = AnimElem = 9
helpertype = normal ;player
name = "Plasma Beam"
ID = 3300
stateno = 3310
pos = floor(56*const(size.xscale)),floor(-78*const(size.yscale))
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = numhelper(3300)=0
trigger1 = Anim != 3301
trigger1 = AnimElemTime(9)>=0
value = 3301

[State 1000, end]
type = ChangeState
triggerall = anim = 3301
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-------------------------------------------------------------------
; Air Plasma Beam
[StateDef 3305]
type = A
movetype= A
physics = N
juggle  = 1
velset = Vel X/10,Vel Y/5
ctrl = 0
anim = 3305
poweradd = 80
sprpriority = 2
offset = 43,-54

[State 0, VelSet]
type = VelSet
trigger1 = Pos Y >= 0
trigger1 = Vel Y >= 0
y = 0

[state 410,3]
type = veladd
trigger1 = var(19)
y = 0
x = 0

[state 410,3]
type = velset
trigger1 = var(19)
y = 0
x = 0

[State 0, ChangeState]
type = ChangeState
triggerall = anim = 3306
trigger1 = animelem = 6 && var(19)
value = 1305

[State 0, VarSet]
type = VarSet
trigger1= !time && var(59)<=0
var(10) = ifelse(command="QCF_B",2,ifelse(command="QCF_C",1,0))

[State 1000, VarSet]
type=varset
trigger1= !time && var(59)>=1
var(10)= ifelse((p2movetype=H || random<500), 2, ifelse(random<500, 1, 0))

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 3305 && AnimElem = 5
value = 3,2
volume = 255
volumescale = 255
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 3305 && AnimElem = 5
value = 4,6
volume = 255
volumescale = 255

[State 0, Helper]
type = Helper
triggerall = numhelper(3305)=0
triggerall = anim = 3305
trigger1 = AnimElem = 5
helpertype = normal ;player
name = "Plasma Beam"
ID = 3305
stateno = 3315
pos = floor(18*const(size.xscale)),floor(-45*const(size.yscale))
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = numhelper(3305)=0
trigger1 = Anim != 3306
trigger1 = AnimElemTime(5)>=0
value = 3306

[State 0, StateTypeSet]
type = StateTypeSet
triggerall = anim = 3306
trigger1 = var(19)=0
trigger1 = AnimElemTime(5)=0
statetype = A       ;S,A,C,L
movetype = I        ;I,A,H
physics = A         ;A,C,S,N


[State 620, ChangeState]
type = ChangeState
triggerall = anim = 3306
triggerall = floor (pos Y < -155)
trigger1 = animelem = 7
value = 1261
ctrl = 1

;------------------------------
; Plasma Beam helper
[Statedef 3310]
type = A
movetype = A
physics = N
ctrl = 0
;anim = 3310
sprpriority = 4
velset = 0,0
juggle = 1

[State 3000, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && Anim != StateNo
value = StateNo

[State 0, VarSet]
type = VarSet
trigger1= !time && !prevstateno
var(10) = ifelse(parent,var(10)=2,2,ifelse(parent,var(10)=1,1,0))

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = floor(43*const(size.xscale)),floor(-76*const(size.yscale))

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=3310
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 4
ignorehitpause = 1
persistent = 1

[State 901:projectile]
type = hitdef
trigger1 = time%5 = 4  && (P2StateNo != [5070,5071])
attr = S,NA
hitflag = MAF
guardflag = MA
animtype = Diagup
air.animtype = Diagup
damage = 75,55
getpower = 50,0
givepower = 20,0
pausetime = 0,12
guard.pausetime = 0,12
sparkno = S9999
guard.sparkno = S8050
sparkxy = -10,-21
hitsound = s5+parent,var(49),3
guardsound = s6+parent,var(49),0
ground.type = High
ground.slidetime = 18
ground.hittime = 20
air.hittime = 19
yaccel = 1.16
ground.velocity = -19.7,-12.7
guard.velocity = -13
ground.cornerpush.veloff = -14
air.velocity = -19.7,-12.7
airguard.velocity = -10.5,3
fall.xvelocity = 0
fall.yvelocity = -2
fall.recover = 0
id = 1+4

[State 220, 8]
type = TargetState
triggerall = p2statetype = S
trigger1 = MoveHit && anim = 3310
trigger1 = NumTarget != 0
trigger1 = target, stateno = [5000,5030]
ignorehitpause = 1
value = 10226

[State 220, 8]
type = TargetState
triggerall = p2statetype = C
trigger1 = MoveHit && anim = 3310
trigger1 = NumTarget != 0
trigger1 = target, stateno = [5000,5030]
ignorehitpause = 1
value = 10227

[State 220, 8]
type = TargetState
triggerall = p2statetype = A
trigger1 = MoveHit && anim = 3310
trigger1 = NumTarget != 0
trigger1 = target, stateno = [5000,5030]
ignorehitpause = 1
value = 10228

[State G-FX, Hit/Guard Spark]
type = Explod
trigger1 = MoveContact
anim = Cond(MoveHit, 8006, 32004)
postype = p1
pos = Floor(P2Dist X - 10), Floor(P2Dist Y - 81)
bindtime = 1
removetime = -2
scale = 0.5, 0.5
supermovetime = 500
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0 

[State 901:destroyself]
type = Destroyself
trigger1 = AnimTime=0
trigger2 = parent,movetype=H
trigger3 = parent,stateno!= 3300

;---------------------------------------------------------
; Hit by Plasma Beam
[Statedef 10226]
type    = S
movetype= H
physics = N
velset = 0,0

[State 225, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 5002

[State 225, 2]
type = ChangeState
trigger1 = Time = 10
value = 10229

;---------------------------------------------------------
; Hit by Plasma Beam
[Statedef 10227]
type    = C
movetype= H
physics = N
velset = 0,0

[State 225, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 5022

[State 225, 2]
type = ChangeState
trigger1 = Time = 10
value = 10229

;---------------------------------------------------------
; Hit by Plasma Beam
[Statedef 10228]
type    = A
movetype= H
physics = N
velset = 0,0

[State 225, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 5012

[State 225, 2]
type = ChangeState
trigger1 = Time = 10
value = 10229

;---------------------------------------------------------
; Hit by Plasma Beam - Flying
[Statedef 10229]
type    = A
movetype= H
physics = N

[State 226, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 225, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 5064

[State 226, 2]
type = VelAdd
trigger1 = 1
y = 1.27

[State 226, 5]
type = SelfState
triggerall = alive = 1
trigger1 = Time = 15
value = 5040

[State -3]
type = ChangeState
triggerall = hitshakeover
trigger1 = !Alive || !Life
value = 5090
;------------------------------
; Plasma Beam helper
[Statedef 3315]
type = A
movetype = A
physics = N
ctrl = 0
;anim = 3315
sprpriority = 4
velset = 0,0
juggle = 1

[State 3000, ChangeAnim]
type = ChangeAnim
trigger1 = !Time && Anim != StateNo
value = StateNo

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1.3,0.92

[State 0, VarSet]
type = VarSet
trigger1= !time && !prevstateno
var(10) = ifelse(parent,var(10)=2,2,ifelse(parent,var(10)=1,1,0))

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
pos = floor(32*const(size.xscale)),floor(-40*const(size.yscale))

[State 901:Assertspecial]
type = assertspecial
trigger1 = 1
flag = noshadow

[State 901:playerpush]
type = PlayerPush
trigger1 = 1
value = 0
persistent = 1

[State 1005, hitoverride]
type=hitoverride
trigger1=1
time=-1
attr=SCA,AA,AP,AT
stateno=3315
ignorehitpause=1

[State 1005, hitby]
type=hitby
trigger1=1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 4
ignorehitpause = 1
persistent = 1

[State 901:projectile]
type = hitdef
trigger1 = time%5 = 4  && (P2StateNo != [5070,5071])
attr = S,NA
hitflag = MAFD
guardflag = MA
animtype = Diagup
air.animtype = Diagup
damage = 75,55
getpower = 50,0
givepower = 20,0
pausetime = 0,7
guard.pausetime = 0,7
sparkno = S9999
guard.sparkno = S8050
sparkxy = -10,11
hitsound = s5+parent,var(49),3
guardsound = s6+parent,var(49),0
ground.type = High
ground.slidetime = 18
ground.hittime = 20
down.velocity = -6,-7
air.hittime = 2
yaccel = 1.16
ground.velocity = -8,-2
guard.velocity = -13
ground.cornerpush.veloff = -14
air.velocity = -7,-2
airguard.velocity = -10.5,3
fall.xvelocity = 0
fall.yvelocity = -2
fall.recover = 0
fall = 1
air.fall = 1

[State G-FX, Hit/Guard Spark]
type = Explod
trigger1 = MoveContact
anim = Cond(MoveHit, 8006, 32004)
postype = p1
pos = Floor(P2Dist X - 10), Floor(P2Dist Y - 81)
bindtime = 1
removetime = -2
scale = 0.5, 0.5
supermovetime = 500
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0 

[State 901:destroyself]
type = Destroyself
trigger1 = AnimTime=0
trigger2 = parent,movetype=H
trigger3 = parent,stateno!= 3305
;---------------------------------------------------------------------------

I also have the video here: https://drive.google.com/file/d/1wxQ5d317gyBsdLgunuR1Ki8tp6oDgAIR/view?usp=sharing

I thank you all for any help on this topic!