Interactive Light Source Code

Started by Flowrellik, September 02, 2014, 07:47:05 AM

Previous topic - Next topic

Flowrellik

OK! Im on one last code hunt for my mugen, and one code I had an eye on is what I found in KOFEXUM.

In some stages where the author was named "light", a backlighting interactive effect appears on the characters, best known example is the Guardian Dogs Temple.
Now, heres the issue. I found the code, but I am having a hard time implementing it inside the character's states files.
Lil help plz?
Spoiler:  The Code here (click to show)
[State -2]
type = Helper
triggerall = !NumHelper(23680)
trigger1 = StageVar(info.author) = "light"
pos = 0,0
stateno = 23680
id = 23680
ownpal = 1
persistent = 0
ignorehitpause = 1
postype = p1

[State -2]
type = Helper
triggerall = !NumHelper(23681)
trigger1 = StageVar(info.author) = "light"
pos = 134,0
stateno = 23681
id = 23681
ownpal = 1
persistent = 0
ignorehitpause = 1
postype = left

[State -2]
type = Helper
triggerall = !NumHelper(23682)
trigger1 = StageVar(info.author) = "light"
pos = -134,0
stateno = 23682
id = 23682
ownpal = 1
persistent = 0
ignorehitpause = 1
postype = right
;--------------------------------------------------------------
;1aD§3oE?I≫OA
;--------------------------------------------------------------
[Statedef 23680]
type    = S
movetype= H
physics = N
velset = 0,0
sprpriority = -10

[State 3680, 4]
type = changeanim
trigger1 = time%2 = 0
value = 99999

[State 3680, 4]
type = ChangeAnim
triggerall = time%2 = 1
trigger1 = ((root,anim = [0,99999]) && root,movetype != H)
trigger2 = (root,anim = [5000,9999])
value = root,anim
elem = root,animelemno(0)
ignorehitpause = 1
persistent = 1

[State 3680, 0]
type = PalFX
trigger1 = time = 0
time = -1
add = 224,88,0
sinadd = 48,50,32,16
;add = 248,232,192

[State 3680,0]
type = NotHitBy
trigger1 = 1
value = SCA

[State 3680, 4]
type=BindToParent
trigger1 = 1
time = -1
facing = 1
pos = (1+ifelse(Parent,fvar(36) = 1,-1,0)+ifelse(Parent,fvar(36) = 2,-2,0))*ifelse(Facing = -1,-1,1),0
;--------------------------------------------------------------
;1aD§×o
;--------------------------------------------------------------
[Statedef 23681]
type    = S
movetype= H
physics = N
velset = 0,0
anim = 99999
sprpriority = -10

[State 3680,1]
type = ParentVarSet
trigger1 = RootDist X > 0 && RootDist X < 52
fvar(36) = 1

[State 3680,1]
type = ParentVarSet
trigger1 = RootDist X < 0
fvar(36) = 0

[State 3680,1]
type = NotHitBy
trigger1 = 1
value = SCA
;--------------------------------------------------------------
;1aD§OO
;--------------------------------------------------------------
[Statedef 23682]
type    = S
movetype= H
physics = N
velset = 0,0
anim = 99999
sprpriority = -10

[State 3680,1]
type = ParentVarSet
trigger1 = RootDist X < 0 && RootDist X > 52
fvar(36) = 1

[State 3680,1]
type = ParentVarSet
trigger1 = RootDist X > 0
fvar(36) = 2

[State 3680,1]
type = NotHitBy
trigger1 = 1
value = SCA