Explod Help [Solved]

Started by Babrico Gurl, August 29, 2011, 09:36:06 PM

Previous topic - Next topic

Babrico Gurl

Hi i'm Babrico Gurl new to the forum an I have a problem here. My problem is my explod works when i'm facing myself in training mode, or regular battles, but when i'm face another opponent other then myself it doesn't appear. 

Example:

Facing myself.


Facing opponent.


;-------------------------------------------------------------------------------
;Custom Hit State Section
;-------------------------------------------------------------------------------
[Statedef 10000]
type = A
movetype = H
physics = N
velset = 0,0

[State 10000, Lifeadd]
type = LifeAdd
trigger1 = Time = 0
trigger2 = Time = 5
absolute = 0
value = ( - 50)

[State 10000, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 5002

[State 10000, End]
type = changestate
trigger1 = hitshakeover
trigger1 = time > 10
value = (Stateno + 1)

;-------------------------------------------------------------------------------
[Statedef 10001]
type = A
movetype = H
physics = N
velset = 0,0

[State 10001, Turn]
type = turn
trigger1 = Time = 0

[State 10001, ChangeAnim]
type = changeanim
trigger1 = 1
value = 5002

[State 10001, End]
type = changestate
trigger1 = hitshakeover
value = (Stateno + 1)

;-------------------------------------------------------------------------------
[Statedef 10002]
type = A
movetype = H
physics = N

[State 10002, HitVelset]
type = HitVelset
trigger1 = Time = 0
x = 10

[State 10002, Velset]
type = Velset
trigger1 = 1
y = 0

[State 10002, Veladd]
type = Veladd
trigger1 = 1
y = 0

[State 10002, VelSet]
type = VelSet
trigger1 = 1
x = 25

[State 10002, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 10002, ChangeAnim]
type = changeanim
trigger1 = Time = 0
value = 5030

[State 10002, End]
type = changestate
trigger1 = backedgebodydist<=10 || frontedgebodydist<=10
value = (Stateno + 1)

;--------------------------------------------------------------------------------------------------------------------
; Problem!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[State 10002, Air Particles]
Type = Explod
Trigger1   = Anim = 5030; Time > 1
Anim       = 103
Postype    = p1
Pos        = 135,-45+Random%40
Scale      = .2,.01
vel        = -2,0
Persistent = 1
supermove  = 9999999999999999999
pausemove  = 9999999999999999999
ontop = 1

[State 10002, Dust Explode]
type = explod
triggerall  = Pos Y >= -40
Trigger1    = Time > 1
anim        = 103
Postype     = P1
scale       = 0.4/fvar(2),0.3/fvar(2)
Pos         = (35), (5 + Pos y * -1)
Persistent  = 2
sprpriority = 1
random      = 2,3
supermove   = 9999999999999999999
pausemove   = 9999999999999999999
ontop       = 1

[State 10002, Dust Explode]
type = explod
triggerall  = Pos Y >= -40
Trigger1    = Time > 1
anim        = 103
Postype     = P1
scale       = 0.5/fvar(2),0.3/fvar(2)
Pos         = (25),(5 + Pos y * -1)
vel         = -4,0
Persistent  = 2
sprpriority = 1
random      = 2,3
supermove   = 9999999999999999999
pausemove   = 9999999999999999999
ontop       = 0
;--------------------------------------------------------------------------------------------------------------------

[State 10002, Selfstate]
type = selfstate
triggerall = Vel Y > 0
trigger1 = Pos Y >= 0
value = (Stateno - 4902)

;-------------------------------------------------------------------------------
[Statedef 10003]
type = A
movetype = H
physics = N

[State 10003, Turn]
type = turn
trigger1 = Time = 0
trigger1 = frontedgedist<backedgedist

[State 10003, HitFallDamage]
type = HitFallDamage
trigger1 = time = 0

[State 10003, EnvShake]
type = EnvShake
trigger1 = 1
IgnoreHitPause = 1
time = 20
freq = 60
ampl = -8
phase = 0

[State 10003, Posset]
type = Posset
trigger1 = 1
x = (-160 * facing)

[State 10003, Posfreeze]
type = posfreeze
trigger1 = 1
x = 1
y = 1

[State 10003, Screenbound]
type = Screenbound
trigger1 = 1
value = 1
movecamera = 0,1

[State 10003, Playerpush]
type = Playerpush
trigger1 = 1
value = 1

[State 10003, Changeanim]
type = Changeanim
trigger1 = 1
value = 5000

[State 10003, End]
type = changestate
trigger1 = time>= 4
value = (Stateno + 1)

;-------------------------------------------------------------------------------
[Statedef 10004]
type = A
movetype = H
physics = N

[State 10004, Turn]
type = Turn
trigger1 = Time = 0

[State 10004, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.3

[State 10004, VelSet]
type = VelSet
trigger1 = Time = 0
x = -0.5
y = -7

[State 10004, Changeanim]
type = Changeanim
trigger1 = Time = 0
value = ifelse(selfanimexist(5051),5051,5030)

[State 10004, Changeanim]
type = Changeanim
trigger1 = anim = 5030 && AnimTime = 0
value = 5050

[State 10004, Changeanim]
type = changeanim
trigger1 = vel y>-3 && anim = 5051
value = 5061

[State 10004, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 10004, Selfstate]
type = Selfstate
triggerall = Vel Y > 0
trigger1 = Pos Y >= 0
value = (Stateno - 4904)


Iv'e also tried P2 instead of P1, any help?

2OS

When enemies are in your custom states they still read their own sprite data so


[Statedef -2]

[State -2, Air Particles]
Type = Explod
trigger1=numtarget
trigger1=target,stateno=10002

Anim       = 103
Postype    = p2
Pos        = 135,-45+Random%40
Scale      = .2,.01
vel        = -2,0
Persistent = 1
supermove  = 9999999999999999999
pausemove  = 9999999999999999999
ontop = 1

[State -2, Dust Explode]
type = explod
triggerall  = Pos Y >= -40
trigger1=numtarget
trigger1=target,stateno=10002

anim        = 103
Postype     = P2
scale       = 0.4/fvar(2),0.3/fvar(2)
Pos         = (35), (5 + Pos y * -1)
Persistent  = 2
sprpriority = 1
random      = 2,3
supermove   = 9999999999999999999
pausemove   = 9999999999999999999
ontop       = 1

[State -2, Dust Explode]
type = explod
triggerall  = Pos Y >= -40
trigger1=numtarget
trigger1=target,stateno=10002

anim        = 103
Postype     = P2
scale       = 0.5/fvar(2),0.3/fvar(2)
Pos         = (25),(5 + Pos y * -1)
vel         = -4,0
Persistent  = 2
sprpriority = 1
random      = 2,3
supermove   = 9999999999999999999
pausemove   = 9999999999999999999
ontop       = 0

Babrico Gurl

Wow, it worked perfectly! Thank you so much!
:)

2OS

Also, when you put enemies in your states their vars don't re-evaluate themselves to yours so you were also probably developing a division by zero error by dividing by fvar(2) ( assuming you're fighting something with no defined fvar(2), default values are 0 ). You can re-evaluate enemy vars through your custom hit  states but it's STUPENDOUSLY recommended to NEVER do so outside of full games.

You're welcome.