News:

MFG's Character of the Month: October 2026 Voting

Main Menu

Reversal Code Problems

Started by Alosson, March 07, 2013, 01:43:08 AM

Previous topic - Next topic

Alosson

I'm having a small problem with code from 2OS's OTH Killer code, I followed most of the tutorial, but it does not seem to be working for me, here is the states of the reversal:

Spoiler (click to show)

[Statedef 90000000]  ;WILL KILL OMEGA TOM HANKS ;special thanks to 2OS

[State RootSelfState]
type=projectile
trigger1=!numprojid(205205)
projid=205205
projremove=0
projremovetime=-1
attr=c,ht  ;;  most uncommon hit attribute
projanim=anim  ;;  if a helper enters this state because it was reversed it means that state has an attack CLSN and a hitdef.
projhitanim=-1
projreanim=-1
projcancelanim=-1
projpriority=9999999
p1stateno=prevstateno  ;;  projectiles can only be owned by the root, so p1stateno will send the root here so it can be reversed ( and killed ) if the anim and hitdef trigger is not ishelper
p2stateno=205205
p2getp1state=0

[Statedef 205205]

[State ]
type=statetypeset
trigger1=ishelper(205205)
trigger1=!time
movetype=i

[State Giant CLSN 1 and 2]
type=changeanim
trigger1=ishelper(205205)
trigger1=!time
value=205205  ;;  Giant CLSN 1 and 2

[State Most Uncommon Hit Attribute]
type=hitby
trigger1=ishelper(205205)
value=c,ht

[State Most Uncommon Hit Attribute 2]
type=hitby
trigger1=ishelper(205205)
value2=c,ht

[State ]
type=reversaldef
trigger1=ishelper(205205)
trigger1=command="LightSky"
reversal.attr=acs,aa,ap,at
p2stateno=90000000
pausetime=12,0
hitsound=-1
sparkno=-1
hitonce=0
numhits=0

[State ]
type=targetstate
trigger1=ishelper(205205)
trigger1=command="LightSky"
value=90000000

[State ]
type=velset
trigger1=ishelper(205205)
x=rootdist x
y=rootdist y
[spoiler/]

State -2
Spoiler (click to show)

[State The Projectile Needs Something To Hit]
type=helper
trigger1=!numhelper(205205)
id=205205
stateno=205205
helpertype=normal
name="OTHK"
pos=0,0
postype=p1
pausemovetime=9999999
supermovetime=9999999
[spoiler/]

Lightsky State:
Spoiler (click to show)

;BEAM ME UP, SCOTTIE
[statedef 3500]
type = S
movetype = A
anim  = 30
poweradd= 0
ctrl = 0
velset = 0

[State 4000]
type = poweradd
trigger1 = Time = 0
value = -7000

[State 4000]
type = superpause
trigger1 = Time = 1
time = 30
anim = 101
pos = 0, -50
movetime = 30
darken = 3
SprPriority = -5

[State 4000]
type = PlaySnd
trigger1 = Time = 1
value = 4, 3
volume = 255

[State 4000]
type = Envcolor
trigger1 = Time = 0
persistent = 0
ignorehitpause = 1
value = 0, 0, 0
time = 60
under = 1
supermove = 1

[State 4000]
type = Helper
trigger1 = Time = 31
ID = 3520
name = "kougeki"
postype = back
pos = 0,0
sprpriority = 2
stateno = 3520
helpertype = normal
keyctrl = 0
persistent = 0
ignorehitpause = 1
ownpal = 1

[State 4000]
type = Explod
trigger1 = Time = 31
anim = 3930;4531
scale = 1.12,1.12
id = 3550
postype = back
pos = -17,-10
sprpriority = -1
supermove = 1
ownpal = 1
removeongethit = 0
bindtime = -1

[State 4000]
type = RemoveExplod
trigger1 = movetype = H
id = 3550

[State 4000]
type = changestate
trigger1 = Time = 150
value = 0
ctrl = 1

;STINKIN HELPER
[Statedef 3520]
type    = S
movetype= A
physics = S
poweradd = 0
ctrl = 0
velset = 0,0
anim = 3555
sprpriority = -1

[State 8220, HOTopreventfromCounterWhoreChars]
type = HitOverRide
trigger1 = 1
time = 1
attr = SCA, AA, AP, AT
stateno = -1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999

[State 4060]
type = PlayerPush
trigger1 = 1
value = 0

[State 4060]
type = bindtoroot
trigger1 = 1
pos = 0,0

[State 4060]
type = PlaySnd
trigger1 = Time = 0
value = 48,0
volume = 255

[State 2500,Hit]
type = HitDef
Trigger1 = time = [0,98]
trigger1 = root,var(30) = 0
attr = S, HP
hitflag = MAFD
guardflag = M
animtype = Hard
damage = 99999999
pausetime = 0,0
sparkno = S7001
guard.sparkno = 40
sparkxy = -5,-5
hitsound = -1
guardsound = -1
ground.type = High
ground.slidetime = 9
ground.hittime = 9
guard.hittime = 18
air.hittime = 13
ground.velocity = 0,0
air.velocity = 0,0
getpower = 0,0
givepower = 0,0
fall = 1
;p2stateno = 90000000

[State 2500,Reversal]
type = ReversalDef
trigger1 = command = "LightSky"
reversal.attr = SCA,AT,AA,AP
hitflag = M-
priority = 7
pausetime = 0,2
numhits = 0
sparkno = -1
hitsound = -1
p2stateno = 90000000
ignorehitpause = 1
pausemovetime = 2147483647
supermovetime = 2147483647

[State 2500,Reversal]
type = ReversalDef
trigger1 = command = "LightSky"
reversal.attr = SCA,AT,AA,AP
hitflag = M-
priority = 7
pausetime = 0,2
numhits = 0
sparkno = -1
hitsound = -1
p2stateno = 90000000
ignorehitpause = 1
pausemovetime = 2147483647
supermovetime = 2147483647

[State 4060]
type = destroyself
trigger1 = AnimTime = 0
[spoiler/]


I should activate when using the move LightSky but it does nothing, I can't seem to figure out the problem. If anyone could help me fix the problem I would be really grateful
"Just face it, the darkness is to strong to handle."