Electric Attack Problem

Started by DragonFaku, May 27, 2011, 05:36:10 AM

Previous topic - Next topic

DragonFaku

I was trying to make a attack from megaman x corrupted





I managed to make one of the thunder pillars to fall, but the other one doesn't work

Can somebody help me and look what's wrong with that code?

;-------------------------------------------------------------------
[Statedef 3220]
type = S
physics = S
movetype = A
anim = 3100
sprpriority = 1
ctrl = 0

[State 800, 0]
type = PowerAdd
trigger1 = time = 2
value = -2000

[State 190, 0]
type = VarSet
trigger1 = time = 0
v = 11
value = 0

[State 5120, 4]
type = PlaySnd
trigger1 = time = 0
value = 3220,0

[State 190, 1]
type = Explod
trigger1 = time = 0
anim = 3410
sprpriority = 2
postype = p1
pos = 10,0

[State 1200,0]
type = helper
trigger1 = time = 10
id = 3220
pos = 10,0
postype = p1
stateno = 3221
helpertype = normal
ownpal = 1

[State 1200,0]
type = helper
trigger1 = time = 20
id = 3220
pos = 10,0
postype = p1
stateno = 3221
helpertype = normal
ownpal = 1

[State 1200,0]
type = helper
trigger1 = time = 30
id = 3220
pos = 10,0
postype = p1
stateno = 3221
helpertype = normal
ownpal = 1

[State 1200,0]
type = helper
trigger1 = time = 40
id = 3220
pos = 10,0
postype = p1
stateno = 3221
helpertype = normal
ownpal = 1

[State 1200,0]
type = helper
trigger1 = time = 50
id = 3220
pos = 10,0
postype = p1
stateno = 3221
helpertype = normal
ownpal = 1

[State 1200,0]
type = helper
trigger1 = time = 60
id = 3220
pos = 10,0
postype = p1
stateno = 3221
helpertype = normal
ownpal = 1

[State 190, 0]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1

[Statedef 3221]
type = A
movetype = A
anim = 3411
sprpriority = 2
ctrl = 0

[State 194, 0]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 190, 0]
type = VelSet
trigger1 = Anim = 3411
x = 0
y = -10

[State 190, 0]
type = Hitdef
trigger1 = 1
attr = A, SP
givepower = 100,100
animtype = Hard
damage = 100,35
hitflag = MA
guardflag = MA
pausetime = 1,10
sparkno = s70
guard.sparkno = s90
sparkxy = 40,-30
hitsound = s0,3
guardsound = s0,4
air.juggle = 1
ground.type = Low
ground.slidetime = 4
ground.hittime = 2
ground.velocity = -3.0, -4
air.velocity = -3.3,-4
fall.yvelocity = 0
air.fall = 1
fall.recover =1
Palfx.time = 5
Palfx.add = 255,255,255
persistent = 0
ignorehitpause = 1

[State 190, 0]
type = ChangeState
trigger1 = Anim = 3411
trigger1 = Pos y < -155
value = 3222

[State 1201,end]
type = Destroyself
trigger1 = time = 30

[Statedef 3222]
type = A
movetype = A
anim = 3412
sprpriority = 2
ctrl = 0

[State 194, 0]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 190, 0]
type = VelSet
trigger1 = Anim = 3412
x = 0
y = 0

[State 190, 0]
type = ChangeAnim
trigger1 = Anim = 3411
trigger1 = Pos x < -155
value = 3412

[State 190, 0]
type = VelSet
trigger1 = Anim = 3412
x = 0
y = 0

[State 190, 0]
type = ChangeState
trigger1 = Anim = 3412
trigger1 = Animtime = 0
value = 3223

[Statedef 3223]
type = A
movetype = A
anim = 3413
sprpriority = 2
ctrl = 0

[State 1200,***]
type = helper
trigger1 = time = 0
id = 3223
pos = -90,0
postype = p1
stateno = 3224
helpertype = normal
ownpal = 1

[State 1200,***]
type = helper
trigger1 = time = 10
id = 3223
pos = -90,0
postype = p1
stateno = 3224
helpertype = normal
ownpal = 1

[State 1200,***]
type = helper
trigger1 = time = 18
id = 3223
pos = -90,0
postype = p1
stateno = 3224
helpertype = normal
ownpal = 1

[State 194, 0]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 190, 0]
type = VelSet
trigger1 = Anim = 3413
x = 10
y = 0

[State 190, 0]
type = Hitdef
trigger1 = 1
attr = A, SP
givepower = 100,100
animtype = Hard
damage = 100,35
hitflag = MA
guardflag = MA
pausetime = 1,10
sparkno = s70
guard.sparkno = s90
sparkxy = 40,-30
hitsound = s0,3
guardsound = s0,4
air.juggle = 1
ground.type = Low
ground.slidetime = 4
ground.hittime = 2
ground.velocity = -3.0, -4
air.velocity = -3.3,-4
fall.yvelocity = 0
air.fall = 1
fall.recover =1
Palfx.time = 5
Palfx.add = 255,255,255
persistent = 0
ignorehitpause = 1

[State 1201,end]
type = Destroyself
trigger1 = FrontEdgeBodyDist <= 0
trigger1 = Stateno = 3225

[State 190, 0]
type = ChangeState
trigger1 = Anim = 3413
trigger1 = FrontEdgeBodyDist <= 0
value = 3225

[Statedef 3224]
type = A
movetype = A
anim = 3413
sprpriority = 2
ctrl = 0

[State 194, 0]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 190, 0]
type = VelSet
trigger1 = Anim = 3413
x = -10
y = 0

[State 190, 0]
type = Hitdef
trigger1 = 1
attr = A, SP
givepower = 100,100
animtype = Hard
damage = 100,35
hitflag = MA
guardflag = MA
pausetime = 1,10
sparkno = s70
guard.sparkno = s90
sparkxy = 40,-30
hitsound = s0,3
guardsound = s0,4
air.juggle = 1
ground.type = Low
ground.slidetime = 4
ground.hittime = 2
ground.velocity = -3.0, -4
air.velocity = -3.3,-4
fall.yvelocity = 0
air.fall = 1
fall.recover =1
Palfx.time = 5
Palfx.add = 255,255,255
persistent = 0
ignorehitpause = 1

[State 1201,end]
type = Destroyself
trigger1 = BackEdgeBodyDist <= 0
trigger1 = Stateno = 3225

[State 190, 0]
type = ChangeState
trigger1 = Anim = 3413
trigger1 = BackEdgeBodyDist <= 0
value = 3225

[Statedef 3225]
type = A
movetype = A
anim = 3412
sprpriority = 2
ctrl = 0

[State 194, 0]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 190, 0]
type = VelSet
trigger1 = Anim = 3412
x = 0
y = 0

[State 190, 0]
type = ChangeState
trigger1 = Anim = 3412
trigger1 = Animtime = 0
value = 3226

[Statedef 3226]
type = A
movetype = A
anim = 3411
sprpriority = 2
ctrl = 0

[State 194, 0]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 190, 0]
type = VelSet
trigger1 = Anim = 3411
x = 0
y = 10

[State 190, 0]
type = Hitdef
trigger1 = 1
attr = A, SP
givepower = 100,100
animtype = Hard
damage = 100,35
hitflag = MA
guardflag = MA
pausetime = 1,10
sparkno = s70
guard.sparkno = s90
sparkxy = 40,-30
hitsound = s0,3
guardsound = s0,4
air.juggle = 1
ground.type = Low
ground.slidetime = 4
ground.hittime = 2
ground.velocity = -3.0, -4
air.velocity = -3.3,-4
fall.yvelocity = 0
air.fall = 1
fall.recover =1
Palfx.time = 5
Palfx.add = 255,255,255
persistent = 0
ignorehitpause = 1

[State 1201,end]
type = Destroyself
trigger1 = time = 30

[State 190, 0]
type = ChangeState
trigger1 = Anim = 3411
trigger1 = Pos x < -5
value = 3227

[Statedef 3227]
type = A
movetype = A
anim = 3412
sprpriority = 2
ctrl = 0

[State 194, 0]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 190, 0]
type = VelSet
trigger1 = Anim = 3412
x = 0
y = 0

[State 1201,end]
type = Destroyself
trigger1 = time = 30

Rajaa Retired

Which "other one"? I see a bunch of unnecessary triggers that don't make any sense to use. Like, how can the helper be triggered to destroy itself if stateno = 3225, if its stateno is 3225? That trigger will never happen. I can't find anything wrong with the code besides that, maybe I'm overlooking something.

Cyanide

That looks over complicated for something that should be very simple.

You create helpers, that go up, then you create MORE helpers that go up. Then they come down again. Eventually.

You need when you get right down to it. 3 states. One where the helper goes up. One where it stops, and another where it goes down, or it sends a helper down. You don't need all these changeanims within the states' that's what ANIM = VALUE is for in statedef.

The fact that one works basically means that you've got something that isn't behaving itself further down the track with the additional helpers. Or you're not waiting long enough. Create one helper using a system more sensible than what we see and have it behave itself. I recommend screenpos Y over pos Y for "top of screen" things as well.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

DragonFaku

#3
Quote from: Cyanide on May 27, 2011, 09:24:43 AM
That looks over complicated for something that should be very simple.

You create helpers, that go up, then you create MORE helpers that go up. Then they come down again. Eventually.

You need when you get right down to it. 3 states. One where the helper goes up. One where it stops, and another where it goes down, or it sends a helper down. You don't need all these changeanims within the states' that's what ANIM = VALUE is for in statedef.

The fact that one works basically means that you've got something that isn't behaving itself further down the track with the additional helpers. Or you're not waiting long enough. Create one helper using a system more sensible than what we see and have it behave itself. I recommend screenpos Y over pos Y for "top of screen" things as well.
LOL, it works, well i have to add other state because i can't change back to a state that already has a changestate.
Thank you so much.
SOLVED