YesNoOk
avatar

I tried to update Marisa's Starburst, but I accidently caused new problems (Read 179 times)

Started by Trinitronity, June 15, 2013, 08:19:09 am
Share this topic:
I tried to update Marisa's Starburst, but I accidently caused new problems
#1  June 15, 2013, 08:19:09 am
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Well...yeah.
First of, thanks goes to Seravy. I have used his code and credited him. That way, the Z version of Starburst, which is Meteoric Debris, finally has got tails.
Everything works fine, but the tails wont disappear, if the stars are gone.
Code:
;----------------------
;Meteoric Depris Star 1
[Statedef 1205]
Type = A
Movetype= A
Physics = N
Ctrl = 0
Sprpriority = 5
anim = 1205

[State 2105]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1205]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
ignorehitpause = 1

[State 2105]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 2000, 1] ;Credits goes to Seravy
type = Helper
trigger1 = !time
pos = 0,0
postype = p1
ID=1210
name = "Tail"
stateno = 1210
ownpal = 1
IgnoreHitPause = 1

[State 2105, HitOverride]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
time = -1
stateno = 1002
ignorehitpause = 1

[State 2105, hitby]
type = hitby
trigger1 = 1
value = SCA,AP
time = -1

[State 2003]
Type = VarSet
Trigger1 = Time = 0
fvar(0) = (Random %41+(pos Y/5))

[State 194]
type = Veladd
trigger1 = time>0
x = cos(fvar(0)*pi/180)*0.25
y = -sin(fvar(0)*pi/180)*0.25

[State 194, ‰Á‘¬]
type = Velset
trigger1 = time=0
x = cos(fvar(0)*pi/180)*7.5
y = -sin(fvar(0)*pi/180)*7.5

[State 2105]
type= HitDef
trigger1 = !Movecontact
attr = A, SP
hitflag = MAF
guardflag = MA
damage = ceil(10*(root,fvar(10))), 5
animtype = Medium
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 0, 1
sparkno = S1202
guard.sparkno = S8300
sparkxy = -30+random%10,-28+random%10
hitsound   = s1,10
guardsound = s2,0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity = -8, 0
guard.velocity = -8
air.velocity = -4,-5
airguard.velocity= -4,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 0
fall.recover = 1
fall.recovertime = 39
air.fall = 1
yaccel = 0.4
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 2105, ChangeState]
type = changestate
trigger1 = var(0)
value = 1203

[State 2105]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -42

;----------------------
;Meteoric Depris Star 2
[Statedef 1206]
Type = A
Movetype= A
Physics = N
Ctrl = 0
Sprpriority = 5
anim = 1206

[State 2105]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1205]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
ignorehitpause = 1

[State 2105]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 2000, 1] ;Credits goes to Seravy
type = Helper
trigger1 = !time
pos = 0,0
postype = p1
ID=1210
name = "Tail"
stateno = 1210
ownpal = 1
IgnoreHitPause = 1

[State 2105, HitOverride]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
time = -1
stateno = 1002
ignorehitpause = 1

[State 2105, hitby]
type = hitby
trigger1 = 1
value = SCA,AP
time = -1

[State 2003]
Type = VarSet
Trigger1 = Time = 0
fvar(0) = (Random %41+(pos Y/5))

[State 194]
type = Veladd
trigger1 = time>0
x = cos(fvar(0)*pi/180)*0.25
y = -sin(fvar(0)*pi/180)*0.25

[State 194, ‰Á‘¬]
type = Velset
trigger1 = time=0
x = cos(fvar(0)*pi/180)*7.5
y = -sin(fvar(0)*pi/180)*7.5

[State 2105]
type= HitDef
trigger1 = !Movecontact
attr = A, SP
hitflag = MAF
guardflag = MA
damage = ceil(10*(root,fvar(10))), 5
animtype = Medium
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 0, 1
sparkno = S1202
guard.sparkno = S8300
sparkxy = -30+random%10,-28+random%10
hitsound   = s1,10
guardsound = s2,0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity = -8, 0
guard.velocity = -8
air.velocity = -4,-5
airguard.velocity= -4,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 0
fall.recover = 1
fall.recovertime = 39
air.fall = 1
yaccel = 0.4
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 2105, ChangeState]
type = changestate
trigger1 = var(0)
value = 1203

[State 2105]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -42

;----------------------
;Meteoric Depris Star 3
[Statedef 1207]
Type = A
Movetype= A
Physics = N
Ctrl = 0
Sprpriority = 5
anim = 1207

[State 2105]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1205]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
ignorehitpause = 1

[State 2105]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 2000, 1] ;Credits goes to Seravy
type = Helper
trigger1 = !time
pos = 0,0
postype = p1
ID=1210
name = "Tail"
stateno = 1210
ownpal = 1
IgnoreHitPause = 1

[State 2105, HitOverride]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
time = -1
stateno = 1002
ignorehitpause = 1

[State 2105, hitby]
type = hitby
trigger1 = 1
value = SCA,AP
time = -1

[State 2003]
Type = VarSet
Trigger1 = Time = 0
fvar(0) = (Random %41+(pos Y/5))

[State 194]
type = Veladd
trigger1 = time>0
x = cos(fvar(0)*pi/180)*0.25
y = -sin(fvar(0)*pi/180)*0.25

[State 194, ‰Á‘¬]
type = Velset
trigger1 = time=0
x = cos(fvar(0)*pi/180)*7.5
y = -sin(fvar(0)*pi/180)*7.5

[State 2105]
type= HitDef
trigger1 = !Movecontact
attr = A, SP
hitflag = MAF
guardflag = MA
damage = ceil(10*(root,fvar(10))), 5
animtype = Medium
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 0, 1
sparkno = S1202
guard.sparkno = S8300
sparkxy = -30+random%10,-28+random%10
hitsound   = s1,10
guardsound = s2,0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity = -8, 0
guard.velocity = -8
air.velocity = -4,-5
airguard.velocity= -4,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 0
fall.recover = 1
fall.recovertime = 39
air.fall = 1
yaccel = 0.4
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 2105, ChangeState]
type = changestate
trigger1 = var(0)
value = 1203

[State 2105]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -42

;----------------------
;Meteoric Depris Star 4
[Statedef 1208]
Type = A
Movetype= A
Physics = N
Ctrl = 0
Sprpriority = 5
anim = 1208

[State 2105]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1205]
type = AngleDraw
trigger1 = 1
scale = 0.5,0.5
ignorehitpause = 1

[State 2105]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 2000, 1] ;Credits goes to Seravy
type = Helper
trigger1 = !time
pos = 0,0
postype = p1
ID=1210
name = "Tail"
stateno = 1210
ownpal = 1
IgnoreHitPause = 1

[State 2105, HitOverride]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
time = -1
stateno = 1002
ignorehitpause = 1

[State 2105, hitby]
type = hitby
trigger1 = 1
value = SCA,AP
time = -1

[State 2003]
Type = VarSet
Trigger1 = Time = 0
var(18) = (Random %41+(pos Y/5))

[State 194]
type = Veladd
trigger1 = time>0
x = cos(fvar(0)*pi/180)*0.25
y = -sin(fvar(0)*pi/180)*0.25

[State 194, ‰Á‘¬]
type = Velset
trigger1 = time=0
x = cos(fvar(0)*pi/180)*7.5
y = -sin(fvar(0)*pi/180)*7.5

[State 2105]
type= HitDef
trigger1 = !Movecontact
attr = A, SP
hitflag = MAF
guardflag = MA
damage = ceil(10*(root,fvar(10))), 5
animtype = Medium
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 0, 1
sparkno = S1202
guard.sparkno = S8300
sparkxy = -30+random%10,-28+random%10
hitsound   = s1,10
guardsound = s2,0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity = -8, 0
guard.velocity = -8
air.velocity = -4,-5
airguard.velocity= -4,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 0
fall.recover = 1
fall.recovertime = 39
air.fall = 1
yaccel = 0.4
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 2105, ChangeState]
type = changestate
trigger1 = var(0)
value = 1203

[State 2105]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -42

;----------------------
;Meteoric Debris Tail
[Statedef 1210]
type    = A
movetype= A
physics = N
Velset = 0,0
sprpriority = 8
ctrl = 0
anim = parent,anim+10

[State noshadow]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State Trans]
Type = Trans
trigger1 = 1
Trans = add
IgnoreHitPause = 1

[State 1000, 0]
type = AngleSet
trigger1 = !time
value = parent,Var(18)-90

[State 1000, 0]
type = Varset
trigger1 = Parent,Vel x != 0
trigger1 = Parent,Vel y != 0
fv = 0
value = Parent,Vel x/(cos((atan(Parent,Vel y/Parent,Vel x)*180/pi)*pi/180))/12.8

[State 1000, 0]
type = Varset
trigger1 = Parent,Vel x = 0
trigger1 = Parent,Vel y > 0
v = 17
value = Parent,Vel x/(cos(270*pi/180))/12.8

[State 1000, 0]
type = Varset
trigger1 = Parent,Vel x = 0
trigger1 = Parent,Vel y < 0
v = 17
value = Parent,Vel x/(cos(90*pi/180))/12.8

[State 1000, 0]
type = Varset
trigger1 = Parent,Vel x > 0
trigger1 = Parent,Vel y = 0
v = 17
value = Parent,Vel x/(cos(360*pi/180))/12.8

[State 1000, 0]
type = Varset
trigger1 = Parent,Vel x < 0
trigger1 = Parent,Vel y = 0
v = 17
value = Parent,Vel x/(cos(180*pi/180))/12.8

[State 1000, 0]
type = AngleDraw
trigger1 = 1
scale = 2,17*0.6

[State 230, 3]
type = BindToParent
trigger1 = 1
pos = 0,0
How can I make the tails check, whenever the parent of the tail is gone. Thanks in advance!
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: I tried to update Marisa's Starburst, but I accidently caused new problems
#2  June 15, 2013, 08:26:21 am
  • *****
  • Mega Klinklang confirmed
    • USA
    • ricepigeon.webs.com
Best way, since there is no "parentexists" trigger, would be to utilize variables in combination with the playerid redirection triggers, record the parent's id the first moment the child helper is spawned, and check that ID for playeridexist as a trigger for the helper's destruction.

If you want an example of how this is done, my Alice uses this in almost every single attack that utilizes her dolls in some way. There should be a mini-tutorial somewhere around state 301.

<<-- Updated 09/14/14

You limit yourself so badly when you try to avoid variables. When you get over your fear of the "complexity" of variables, you will find yourself in a better place: A beautiful world where coding is actually fun.
Re: I tried to update Marisa's Starburst, but I accidently caused new problems
#3  June 15, 2013, 09:18:03 am
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Thanks, it worked wonders.
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: I tried to update Marisa's Starburst, but I accidently caused new problems
#4  June 15, 2013, 01:38:03 pm
  • ****
    • Hungary
    • seravy.x10.mx/Wordpress
Quote
Best way, since there is no "parentexists" trigger, would be to utilize variables in combination with the playerid redirection triggers, record the parent's id the first moment the child helper is spawned, and check that ID for playeridexist as a trigger for the helper's destruction.
That's a great idea, I'm going to do that, too. Not that parent debug spawn does any harm for me but it bothered me that it's the only thing I can't get rid of.
Re: I tried to update Marisa's Starburst, but I accidently caused new problems
#5  June 15, 2013, 02:15:26 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Don't worry, Seravy.
I used it with debug mode on, and I got no debug flood at all.
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns