YesNoOk
avatar

Projectile and the corner. (Read 552 times)

Started by LaQuak, June 05, 2008, 05:27:51 pm
Share this topic:
Projectile and the corner.
#1  June 05, 2008, 05:27:51 pm
  • ****
    • www.justnopoint.com/Masters/
Yo whats up family hows it going.

Check this out. I am testing as usual and I came up at another projectile issue. This one is just the little Kikouken, not the super projectile.

Say p2 is poped in the air in the corner and is coming down. If I throw my Kikouken and it hits just like right at the end, Mugen crashes indefinately. I think it has something to do with how I am removing the projectile. Here is my coding.

[mcode]; Kikouken Stance
[StateDef 1012]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1012
poweradd = 100
sprpriority = 2

[State 1012, Kikouken Input Check Variable]
type = VarSet
trigger1 = Time = 0
v = 33
value = IfElse(command = "Medium Kikouken",2,IfElse(command = "Heavy Kikouken",1,0))

[State 1012,Helper]
type = Helper
trigger1 = AnimElem = 7
id = 1015
name = "Kikouken"
pos = 70,-55
postype = P1
stateno = 1015
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
size.xscale = 1
size.yscale = 1

[State 1012, Kikouken Voice]
type = PlaySnd
trigger1 = AnimElem = 7
value = s9,1

[State 1012, Kikouken Wave]
type = PlaySnd
trigger1 = AnimElem = 7
value = s9,2

[State 1012, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Kikouken Projectile
[StateDef 1015]
type = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 1015
sprpriority = 4

[State 1015, HitAdd]
type = HitAdd
trigger1 = 1
value = 0
persistent = 0

[State 1015, Input Check]
type = VarSet
trigger1 = !Time
var(33)=root,var(33)

[State 1015, HitOverride]
type = HitOverride
trigger1 = 1
time = -1
attr = SCA,AA,AP,AT
stateno = 1016
ignorehitpause = 1

[State 1015, HitBy]
type = HitBy
trigger1 = 1
time = -1
value = SCA,NP,SP,HP
ignorehitpause = 1

[State 1015, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1015, VelSet]
type = VelSet
trigger1 = Time = 1
x = IfElse(Var(33)=0,3,IfElse(Var(33)=2,4,5))
y = 0

[State 1000, Projectile]
type = Projectile
trigger1 = Time = 1
projanim = 1017
Projhitanim = 1016
Projremanim = 1016
projcancelanim = 1016
projremovetime = -1
offset = 0, 0
projpriority = 1
projsprpriority = 4
velocity = vel X, vel Y
attr = S, SP
damage = IfElse(Var(33)=0,80,IfElse(Var(33)=2,90,100)),15
animtype = Heavy
hitflag = MAF
guardflag = MA
pausetime = 10,10
sparkno = S7004+(random%4)
guard.sparkno = S7012
sparkxy = 25, 0
hitsound = S2,3
guardsound = S10,1
ground.type = Low
ground.slidetime = 15
ground.hittime = 10
air.hittime = 10
guard.ctrltime = 18
ground.velocity = -8,0
guard.velocity = -8
air.velocity = -4.5, -6
airguard.velocity = -5.33,-1
fall = 0
fall.recover = 0
air.fall = 1
air.recover = 0
envshake.time = 8
envshake.ampl = 2
ProjID = 1015
getpower = 0
givepower = 0
numhits = 1

[State 1015, DestroySelf]
type = DestroySelf
triggerall = Time > 1
trigger1 = FrontEdgeDist <= -10

[State 1015, 4]
type = ChangeState
triggerall = Time > 1
trigger1 = !root,NumProjID(1015)
value = 1016
;---------------------------------------------------------------------------
; Kikouken Expire
[StateDef 1016]
type = S
movetype = I
physics = N
ctrl = 0
velset = 0,0
anim = 1016

[State 1016, Helper]
type = Helper
triggerall = !NumHelper(1016)
trigger1 = root,ProjHitTime(1015) = 1
id = 1016
name = "Kikouken Expire"
pos = 0,0
postype = P1
stateno = 1016
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1
pausemovetime = 99999
supermovetime = 99999
size.xscale = 1
size.yscale = 1

[State 1016, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1016, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0[/mcode]

The expire state is the one animation where it looks like when it hits something but I think it has to do with.
[State 1015, DestroySelf]
type = DestroySelf
triggerall = Time > 1
trigger1 = FrontEdgeDist <= -10

*shrugs* 
Re: Projectile and the corner.
#2  June 05, 2008, 06:26:08 pm
  • ******
    • www.mugenguild.com/pots/
In State 1016 you're immediately creating a helper that also starts in State 1016, it's not only pointless but also creates the maximum number of helpers allowed immediately. I'm not sure that'd make it crash, but it can't be good either so try without it.
Use anything you want from my works.  If you need to contact me use email, not private messages.
Re: Projectile and the corner.
#3  June 05, 2008, 06:39:37 pm
  • ******
  • [E]
    • Mexico
It should, since helpers are created the exact tick that code is infinitely recursive.

helper gets to state 1016
  helper in state 1016 creates a helper in state 1016
      helper in state 1016 creates a helper in state 1016
            helper in state 1016 creates a helper in state 1016
                    helper in state 1016 creates a helper in state 1016
                             helper in state 1016 creates a helper in state 1016
etc..
Re: Projectile and the corner.
#4  June 05, 2008, 07:47:19 pm
  • **
    • Barbados
Ahh, does that mean that you are effectively creating an indefinite state then ?
I think I had the same problem, when my projectile hit another (countering) it made another helper, which was a dummy character al the time.
Re: Projectile and the corner.
#5  June 05, 2008, 09:59:28 pm
  • ****
    • www.justnopoint.com/Masters/
Oh ok so the issue is within 1016 I will take a look. I can probably remove the state 1016 all together because my expire animation is in the projectile sctrl. I am going to try, I dont even know what happened. This was my 1st projectile coding.

p.s. you should really answer my PM its really important.  :sugoi:
Re: Projectile and the corner.
New #6  June 06, 2008, 07:42:39 am
  • ****
    • www.justnopoint.com/Masters/
I am up to troubleshooting this problem right now this is whats happening.

If I take the Kikouken Expire portion out then I can see the projectile still visible after it gets hit. Did I even code this projectile the right way? I am lost at the moment can you guys instruct further?

-Edit

Hmm never mind I took the Helper sctrl out of 1016 Kikouken Expire and it seems to work ok. I dont even know why I put there I maye have coded it when I got up from my nap dreaming I was with Ayumi Hamasaki or something similar idk *shrugs* I hope nothing else arise about these projectile they are not really my fav. I dont like fireballs. Fights should be with fists, legs and sometimes sticks. Yup.

Thanks alot for the help dudes.
Last Edit: June 06, 2008, 07:49:07 am by LaQuak