Jump to content
  • 0

Clones spawn from reflector


Bjay
 Share

Question

 

SP-Athena (by JFCT555) has a bug where if she's hit during her use of reflector with certain timing, a clone of her spawns.

 

 

;======================================================
; Psycho Reflector (1/5)
;=====d=================================================
[Statedef 1500]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 1500
poweradd = ifelse(Var(23)>0,0,72)
ctrl = 0
sprpriority = 2
facep2 = 1
[State 1500, 1]
type = VarAdd
triggerall = (prevstateno=200||prevstateno=220||prevstateno=250||prevstateno=260||prevstateno=440||prevstateno=1300||prevstateno=1310||prevstateno=1601)
trigger1 = time = 0
var(23) = -160
ignorehitpause = 1
persistent = 1
[State 1500, 2]
type = PalFX
triggerall = (prevstateno=200||prevstateno=220||prevstateno=250||prevstateno=260||prevstateno=440||prevstateno=1300||prevstateno=1310||prevstateno=1601)
trigger1 = (GameTime%2) = 0 && time < 8
time = 1
add = 256,256,256
mul = 256,256,256
sinadd = 256,256,256,1
invertall = 0
color = 256
ignorehitpause = 1
[state 1500, 3]
type = RemoveExplod
trigger1 = time = 0
ID = 1303
[state 1500, 4]
type = RemoveExplod
trigger1 = time = 0
ID = 1313
[State 1500, 5]
type = Explod
triggerall = time = 2
trigger1 = NumExplod(1502) = 0
anim = 1502
id = 1502
postype = p1
pos = 32,-72
ownpal = 1
bindtime = -1
ignorehitpause = 1
sprpriority = 3
removetime = 34
supermove = 0
removeongethit = 1
shadow  = 128,128,128
[State 1500, 6]
type = ModifyExplod
trigger1 = NumExplod(1502) = 1 && time = [2,12]
ID = 1502
scale = ((time-2)*0.1),((time-2)*0.1)
[State 1500, 7]
type = PlaySnd
trigger1 = AnimElem = 3
value = s1500,0
channel = 1
[State 1500, 8]
type = PlaySnd
trigger1 = AnimElem = 3
value = s1500,1
channel = 6
[State 1500, 9]
type = Helper
trigger1 = Animelem = 6
helpertype = Normal
name = "Reversal Helper"
id = 1505
pos = 32,-72
postype = P1
facing = 1
stateno = 1505
keyctrl = 0 
ownpal = 1
sprpriority = 4
[State 1500, 10]
type = Stopsnd
trigger1 = NumProjID(1507) = 1
channel = 6
[State 1500, 11]
type = RemoveExplod
triggerall = Animelemtime(6) >= 0
trigger1 = Numhelper(1505) = 0
ID = 1502
[State 1500, 12]
type = ChangeAnim
triggerall = Animelemtime(6) >= 0
trigger1 = Numhelper(1505) = 0
value = 1501
[State 1500, 13]
type = ChangeState
trigger1 = NumProjID(1507) = 1
trigger2 = Animelemtime(6) >= 0
trigger2 = !Numhelper(1505)
value = 1501
ctrl = 0
[State 1500, 14]
type = Explod
trigger1 = Time = 36
anim = 1503
id = 1503
postype = p1
pos = 32,-72
ownpal = 1
bindtime = -1
ignorehitpause = 1
sprpriority = 5
supermove = 0
shadow  = 128,128,128
[State 1500, 15]
type = Varset
trigger1 = prevstateno = 1601 || prevstateno = 1300 || prevstateno = 1310
trigger2 = prevstateno = 300 || prevstateno = 350 || prevstateno = 440
v = 3
value = ifelse((prevstateno = 300 || prevstateno = 350 || prevstateno = 440),4,3)
[State 1500, 16]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------------------------
; Psycho Reflector (2/5)
;------------------------------------------------------
[Statedef 1501]
type    = S
movetype= I
physics = S
velset = 0,0
anim = ifelse((prevstateno = 1550),1553,1501)
ctrl = 0
sprpriority = 2
[State 1501, 1]
type = RemoveExplod
trigger1 = time = 0
ID = ifelse((prevstateno = 1550),1561,1502)
[State 1501, 2]
type = Explod
trigger1 = Animelem = 1
anim = ifelse((prevstateno = 1550),1562,1503)
id = 1503
postype = p1
pos = ifelse((prevstateno = 1550),60,32),ifelse((prevstateno = 1550),-73,-72)
ownpal = 1
bindtime = -1
ignorehitpause = 1
sprpriority = 5
supermove = 0
shadow  = 128,128,128
[State 1501, 3]
type = Varset
trigger1 = p2movetype = H
v = 3
value = 4
[State 1501, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;------------------------------------------------------
; Psycho Reflector (3/5)
;------------------------------------------------------
[Statedef 1505]
type    = S
movetype = A
physics = N
velset = 0,0
anim = ifelse((root,stateno = 1550),1554,1504)
ctrl = 0
sprpriority = 2
[state 1505, 1]
type = parentvarset
Trigger1 = time = 0
var(36) = 0
ignorehitpause = 1
[state 1505, 2]
type = Projectile
triggerall = root,stateno = 1500
trigger1 = time%1 = 0 && NumProjID(1504) = 0 && parent,var(36) = 0
ProjAnim = 1504
ProjID = 1504
ProjHitAnim = -1
projedgebound = 64
projstagebound = 64
projshadow = 128,128,128
projpriority = 9
Projremovetime = 1
offset = 0,1
velocity = 0, 0
accel = 0, 0
guardflag = MA
attr = S, SP
animtype = Hard
damage = ceil(130*(ifelse((root,var(23)>=0),0.75,1)-(root,var(42)*0.15))), 10
getpower = ifelse(Var(23)>0,0,112),ifelse(Var(23)>0,0,112)
givepower = 16, 16
pausetime = 12,12
sparkno = s6002
sparkxy = 20,0
guard.sparkno = s6014
hitsound = s1,2
guardsound = s2,1
ground.type = Low
ground.slidetime = 18
ground.hittime = 18
ground.velocity = -4,-7
ground.cornerpush.veloff = 0
guard.velocity = -12
air.velocity = -4,-9
airguard.velocity = -5,-4
air.juggle = ifelse((root,var(3) = 7||root,var(3) = [1,3]),0,ifelse((root,var(3)=6),16,11))
air.fall = 1
air.recover = 0
air.animtype = back
fall.recover = 0
yaccel = 0.5
ownpal = 1
fall = 1
[state 1505, 3]
type = Projectile
triggerall = root,stateno = 1550 && time >= 2
trigger1 = time%8 = 0 && NumProjID(1554) = 0 && parent,var(36) = 0
ProjAnim = 1554
ProjID = 1554
ProjHitAnim = -1
projedgebound = 64
projstagebound = 64
projshadow = 128,128,128
projpriority = 9
Projremovetime = 2
offset = 0,1
velocity = 0, 0
accel = 0, 0
guardflag = MA
attr = S, SP
animtype = Hard
damage = ceil(45*(ifelse((root,var(23)>=0),0.75,1)-(root,var(42)*0.15))), 7
getpower = ifelse(Var(23)>0,0,112),ifelse(Var(23)>0,0,112)
givepower = 16, 16
pausetime = 12,12
sparkno = s6002
sparkxy = 20,0
guard.sparkno = s6014
hitsound = s1,4
guardsound = s2,1
ground.type = Low
ground.slidetime = 18
ground.hittime = 18
ground.velocity = -4,-7
ground.cornerpush.veloff = 0
guard.velocity = -12
air.velocity = -4,-9
airguard.velocity = -5,-4
air.juggle = ifelse((root,var(3) = 7||root,var(3) = [1,3]),2,ifelse((root,var(3)=6||root,var(3)=4),16,5))
air.fall = 1
air.recover = 0
air.animtype = back
fall.recover = 0
yaccel = 0.5
ownpal = 1
fall = 1
[State 1505, 4]
type = Helper
trigger1 = !Time
helpertype = normal
name = "Reflector"
ID = 1506
stateno = 1506
ownpal = 1
[State 1505, 5]
type = Destroyself
trigger1 = root,stateno = 1500 && time >= 23
trigger2 = root,stateno = 1550 && hitcount > 2 || root,stateno = 1550 && time >= 41
trigger3 = root,stateno = 1501 || root, anim = 1501 || root, anim = 1553
trigger4 = root,movetype = H
trigger5 = parent,var(36) = 1
ignorehitpause = 1
persistent = 1
;------------------------------------------------------
; Psycho Reflector (4/5)
;------------------------------------------------------
[Statedef 1506]
type    = A
movetype= A
physics = N
poweradd= 0
velset = 0,0
anim = ifelse((root,stateno = 1550),1555,1506)
sprpriority = 5
[State 1506, 1]
type = BindToParent
trigger1 = !Time
time = -1
pos = 0,0
ignorehitpause =1
[State 1506, 2]
type = HitDef
trigger1 = time >= 0
attr = S, HP;
hitflag = P
priority = 7, Hit
p1stateno = 1507
sound = -1
[State 1506, 3]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1
[State 1506, 4]
type = DestroySelf
trigger1 = movecontact
trigger2 = !AnimTime ||root,MoveType = H ||root,ctrl
trigger3 = !AnimTime ||root,MoveType = H
trigger4 = root, stateno = 1501 || root, anim = 1501
ignorehitpause = 1
;------------------------------------------------------
; Psycho Reflector (5/5)
;------------------------------------------------------
[Statedef 1507]
type    = S
physics = N
velset = 0,0
anim = 10000
ctrl = 0
sprpriority = 2
[State 1507, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = s1500,2
[State 10005, AEGIS]
type = HitOverRide
trigger1 = 1
attr = SCA, AP
stateno = 1507
ignorehitpause = 0
[State 10021, Hitby]
type = HitBy
trigger1 = 1
value = SCA, AP
ignorehitpause = 1
[State 10021 REFLECTOR]
type = reversaldef
trigger1 = 1
reversal.attr = SCA,AP
pausetime = 0,0
sparkno = -1
sparkxy = 0,0
p2stateno = 1580
p2getp1state = 1
p1stateno = 1507
[State 1507, 2]
type = Projectile
trigger1 = AnimElem = 1
ProjAnim = 1001
ProjID = 1507
ProjHitAnim = 1002
projedgebound = 64
projstagebound = 64
projshadow = 128,128,128
projpriority = 9
projsprpriority = 9
offset = 0,0
velocity = 10, 0
accel = 0, 0
guardflag = MA
attr = S, SP
damage = 110, 10
animtype = diagup
getpower = ifelse(Var(23)>0,0,100),ifelse(Var(23)>0,0,100)
givepower = 16,16
pausetime = 6,12
sparkno = s6002
sparkxy = 20,0
guard.sparkno = s6014
hitsound = s1,4
guardsound = s2,1
ground.type = high
ground.slidetime = 17
ground.hittime = 18
ground.velocity = -2,-11.2
guard.velocity = -8
air.velocity = -2,-11.2
airguard.velocity = -5,-4
air.juggle = ifelse((prevstateno = 300),15,0)
air.fall = 1
air.recover = 0
fall.recover = 0
yaccel = 0.51
fall = 1
afterImage.length = 24
afterimage.palcolor = 256
afterImage.PalBright = 12,12,12
afterImage.PalContrast = 128,128,128
afterImage.PalAdd = 0,0,0
afterImage.TimeGap  = 1
afterImage.FrameGap = 1
afterImage.Trans = Add
afterImage.Time = -1
[State 1507, 3]
type = Destroyself
trigger1 = time > 1
;HELPER PROJECTILE KILLER >:
[Statedef 1580]
physics = N
ctrl = 0
[State 1580]
type = DestroySelf
trigger1 = IsHelper
ignorehitpause = 1
[State 1580]
type = SelfState
trigger1 = !IsHelper
value = 0
ctrl = 1[/code][/spoiler]

 

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Try adding 'ignorehitpause=1' to the NotHitBy controller in state 1506.

Tried it, but it didn't work unfortunately.

Try adding a HitOverride or ReversalDef. But it requires you for Athena to go into a new stateno and fire a projectile that counts as the reflected projectile.

State 1507 already has those though? Unless I'm confusing that with something else.

Link to comment
Share on other sites

  • 0

I'm sorry, I don't know what kind of approach to a reflect move that the author is using for the move.  The most reliable way to make it work is to put a HitOverride SCTRL in the reflector shield that redirects to a state that fires a projectile, and the helper (not the projectile) destroys itself in the next tick.

What I usually do about possible cloning bugs is to include DestroySelf SCTRLs in state 0 and each of the hit states with an 'IsHelper' trigger in case something like this happens.

Link to comment
Share on other sites

  • 0

Yikes a mess here. Anyway a bunch of explods and helpers being spawned and then changing states without the destroyself and removeExplod states being carried over to the states being changed to.  Will probably have to copy several of the removeExplods and Destryselfs to multiple states as the explods and helpers are in multiple states. I see movecontact in the destroyself state but didn't notice a parent/root movecontact if the spawner of the helper is hit. May need to resort to a -2 state with this as the helpers and explods span multiple states.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...