YesNoOk
avatar

Stop repeated move (Read 534 times)

Started by mugenfan89, March 20, 2021, 04:33:04 AM
Share this topic:
Stop repeated move
New #1  March 20, 2021, 04:33:04 AM
  • avatar
  • *
    • USA
How do I stop a special move from being in able to repeat itself and keep the CPU in the air, I would like to hit him only once or twice but I usually keep him on air after 5-6 hits with the same special which makes the special sorta cheap.

Here is the code, thank you in advance.

;Spinning Fan
[StateDef 1290];RotationFan
type = S
movetype= A
physics = S
juggle  = 1
velset = 5,0
ctrl = 0
anim = 1700
poweradd = 20
sprpriority = 2

[State 1000, 7]
type = statetypeset
trigger1 = Time = 0 && Pos y > var(57)
value = A

[State 430, 2]
type = HitDef
trigger1 =! movecontact && p2statetype != C
p2stateno = 1293
attr = C, NA
damage    = 100, 50
animtype = Back
hitflag = MAF ;HAF
guardflag = HL
pausetime = 0,2
sparkno = -1
sparkxy = -18,-100
guard.sparkno = -1
hitsound = s20,2
;p2facing = 1
guardsound = s20,3
ground.cornerpush.veloff = -25
guard.cornerpush.veloff = -20
ground.type = High
guard.ctrltime = 20
guard.slidetime = 20
ground.slidetime = 20
ground.hittime = 20
ground.velocity = ifelse(p2dist x < 0, 2,-2),-9
air.velocity = ifelse(p2dist x < 0, 2,-2),-8
priority = 1,miss
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
envshake.time = 16
envshake.freq = 60
envshake.ampl = 7
guard.dist = 180

[State 1040, 0.erf7]
type = selfstate
trigger1 = movehit
value = 1291

[State 430, 1]
type = PlaySnd
trigger1 = animelem = 1
value = S9,10
volumescale = 250

[State 430, 1]
type = PlaySnd
trigger1 = animelem = 1
value = S9,1+random%2
volumescale = 350

[State 240, 1.5]
type = varset
trigger1 = time = 0
trigger2 = animtime = 0
v = 11
value = 0

[State 240, 1.5]
type = varset
trigger1 = movecontact
v = -5
value = pos y
ignorehitpause = 1
persistent = 0

[State 600, 1.5]
type = velset
trigger1 = time = [1, 30]
y = 0
x = 4
ignorehitpause = 1

[State 600, 1.5]
type = velset
trigger1 = time = [30, 37]
y = 0
x = 0
ignorehitpause = 1

[State ]
type = targetvelset
trigger1 = moveguarded && target,hitover = 0
x = -2
ignorehitpause = 1

[State ]
type = PlaySnd
trigger1 = Moveguarded
value = f5,14
volumescale = 200
ignorehitpause = 1
persistent = 0

[State ]
type = ChangeState
trigger1 = numexplod(11009) > 0 && !movecontact && command = "fanup"
value = 1400
ctrl = 0

[State 431, 4]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

[Statedef 1291]
type = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
velset = 0,0
anim = 1701
poweradd = 20
sprpriority = 2

[State 1000, 7]
type = statetypeset
trigger1 = Time = 0 && Pos y > var(57)
value = A

[State 430, 2]
type = HitDef
trigger1 =! movecontact
attr = C, NA
damage    = 120 ,75
animtype = Back
hitflag = MAF ;HAF
guardflag = HL
pausetime = 0,2
sparkno = -1
sparkxy = -18,-100
guard.sparkno = -1
hitsound = s20,2
;p2facing = 1
guardsound = s20,3
ground.cornerpush.veloff = -25
guard.cornerpush.veloff = -20
ground.type = High
guard.ctrltime = 20
guard.slidetime = 20
ground.slidetime = 20
ground.hittime = 20
ground.velocity = ifelse(p2dist x < 0, 2,-2),-7
air.velocity = ifelse(p2dist x < 0, 2,-2),-6
priority = 1,miss
yaccel = 0.315
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
envshake.time = 16
envshake.freq = 60
envshake.ampl = 7
guard.dist = 180

[State 430, 1]
type = PlaySnd
trigger1 = animelem = 1
value = S20,2
volumescale = 250

[State 430, 1]
type = PlaySnd
trigger1 = animelem = 5
value = S5,1+random%2
volumescale = 350

[State 2, Upperblood]
type = Helper
trigger1 = time = 0
trigger1 = numhelper(28) < 1
ID = 28
stateno = 28-(p2name = "motaro")
pos = 0, 0
postype = p1
persistent = 0
ignorehitpause = 1



[State 2, Upperblood]
type = Helper
trigger1 = time = 0
stateno = 499
persistent = 0
ignorehitpause = 1

[State 240, 1.5]
type = varset
trigger1 = time = 0
trigger2 = animtime = 0
v = 11
value = 0

[State 240, 1.5]
type = varset
trigger1 = movecontact
v = -5
value = pos y
ignorehitpause = 1
persistent = 0

[State 600, 1.5]
type = velset
trigger1 = time = [1, 30]
y = 0
x = 4
ignorehitpause = 1

[State 600, Select]
type = VarRandom
trigger1 = Time = 1
v = 11
range = 11, 12

[State ]
type = ChangeState
trigger1 = numexplod(11009) > 0 && time > 16 && command = "fanup"
value = 1400
ctrl = 0


[State 600, 1.5]
type = velset
trigger1 = time = [17, 39]
y = 0
x = 0
ignorehitpause = 1

[State 431, 4]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

[State ]
type = targetvelset
trigger1 = moveguarded && target,hitover = 0
x = -3
ignorehitpause = 1

[State ]
type = PlaySnd
trigger1 = Moveguarded
value = f5,14
volumescale = 200
ignorehitpause = 1
persistent = 0

[State 431, 4]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

[Statedef 1293]   ;hit by fan
type    = U
movetype= H
physics = N
juggle  = 2
anim = 21238
velset = 0,0
ctrl = 0
sprpriority = 0

[State 820, 4351]
type = velset
Trigger1 = time = [0,12]
y = -8

[State 820, 4351]
type = velset
Trigger1 = time > 13
y = 0

[State 1000, 7]
type = posadd
trigger1 = time = [0,12]
x = 1

;[State 1000, 7]
;type = posset
;trigger1 = pos y > var(57)
;y = var(57)

;[State 1000, 7]
;type = statetypeset
;trigger1 = pos y >= var(57)
;value = S

;[State 1000, 7]
;type = statetypeset
;trigger1 = pos y < var(57)
;value = A

[State 0, throw-up]
type = Explod
trigger1 = numexplod(118) = 0
anim = 888
ID = 118
removetime = -1
removeongethit = 0
ignorehitpause = 1

[state 0, throw up protection]
type = defencemulset
trigger1 = 1
value = 0.5

[State 1000, 7]
type = selfstate
triggerall = time = 25
trigger1 = alive = 0
;trigger2 = pos y < var(57)
value = 1294

[Statedef 1294]   ;hit by fan
type    = U
movetype= H
physics = N
juggle  = 2
anim = 5080
velset = 0,0
ctrl = 0
sprpriority = 0

[State 0, VelSet]
type = VelSet
trigger1 = time = 8
y = pos y >= var(57) && vel y > 0

[State 1050, 7]
type = selfstate
trigger1 = pos y >= var(57) && vel y > 0
value = 52
anim = 47
Last Edit: March 20, 2021, 04:47:36 PM by mugenfan89