YesNoOk
avatar

Counter Attack coding help  (Read 1628 times)

Started by ziaker, March 25, 2019, 12:17:39 pm
Share this topic:
Counter Attack coding help
#1  March 25, 2019, 12:17:39 pm
  • *
    • Brazil
I need help, in the counter attack I created, the character gets stuck in the animation infinitely, the counter attack does not hurt too.
here my code



;Counter
[StateDef 9857]
type    = S
movetype= A
psysics = N
juggle  = 4
poweradd= -950
velset = 0,0
anim = 9857
ctrl = 0
sprpriority = 8

[State 0, ReversalDef]
type = ReversalDef
trigger1 = animelem = 4
reversal.attr = S,NA,SA,HA
pausetime = 0,20
sparkno = S3
sparkxy = 0,-50
plstateno = 1410

[State 0, HitOverride]
type= HitOverride
trigger1 = time > 30
attr = S,NA
stateno = 9857
time = 1
forceair = 0

[State 9857, 0]
type = ChangeState
trigger1 = AnimTime = 5
value = 0
ctrl = 1
attr = S, NA
damage = 10, 35, 10
animtype = hard
guardflags = MA
hitflag = MAF
priority = 7, hit

pausetime = 8, 8
sparkno = 1
sparkxy = -10, -76

hitsound = 5, 0
guardsound = 6, 0
ground.type = high
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12


What I want to do with this counter attack is: a counter attack that gives an intangible boost to the opponent and deals damage and, as you can see, is very early on.

I also want to know how to create an attack that causes a knockback that pushes the enemy until the end of the stage
Re: Counter Attack coding help
#2  March 28, 2019, 01:16:24 pm
  • *****
  • Shame on you!
    • USA

  • Online
This is your problem.
Code:
[State 9857, 0]
type = ChangeState
trigger1 = AnimTime = 5
value = 0
ctrl = 1
attr = S, NA
damage = 10, 35, 10
You have what looks to be a ChangeState in the middle of a Hitdef.

With you saying it gets stuck in a loop, AnimTime = 5, Make sure your animation is set up properly too.
vVv Ryuko718 Updated 10/31/22 vVv