News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Help with some Triggering

Started by The Lord of the Flies, November 09, 2009, 04:54:48 PM

Previous topic - Next topic

The Lord of the Flies

Ok, I'm in a helper's state, as you can see, its variable is equal to the Root variable, and I'm having trouble with these triggers:

[State 1021, ChangeState]
type = ChangeState
trigger1 = MoveContact
trigger2 = var(6) = 1 && Time = 60
trigger3 = var(6) = 2 && Time = 83
trigger4 = var(6) = 3 && Time = 95

trigger5 = Parent, StateNo != 1020
value = 1023
ignorehitpause = 1

As of now, the only thing that happens, triggers 3 and 4 (when var(6) is 2 or 3) won't apply at all.

Any thoughts? If you need more info, please let me know.

Sig made by TempesT :)

Bastard Mami

display to clipboard the vars, the code does not seem to be wrong.

The Lord of the Flies

Ok, I found the problem I had. Clearly an obvious error.
But, you can help me with these other triggering:




[State 1032, Sparks]
type = Explod
trigger1 = MoveHit&&NumTarget
anim = 6010+(random%8)
ID = 6000
sprpriority = 5
postype = p1
pos = 10,-6
removetime =- 2
ownpal = 1
facing = -1
ignorehitpause = 1
persistent = 0
pausemovetime = 100
supermovetime = 100

That is for a Kaiser Wave, which we all know can hit up to 4 times. The thing is, I only succeed in making it trigger once, thus having no hitsparks for 2-4 hit count :(.

Here's the HitDef for the 4 hit Kaiser Wave, just in case:
[State 1031, HitDef]
type = HitDef
triggerall = var(7) = 4
trigger1 = Time % 1 = 0  ;HitDef
attr = S,SP
hitflag = MAF
guardflag = MA
getpower = 0,0
givepower = 0,0
animtype = Hard
fall.animtype = Back
priority = 5,Hit
damage = (100 - (uniqhitcount*30)),20
pausetime = 4,4
sparkxy = 10,-6
sparkno = -1
hitsound = S3,0
guardsound = S2,0
guard.sparkno = S6031
ground.type = Low
ground.slidetime = 26
ground.hittime  = 20
ground.velocity = -6.5, -4
air.animtype = Back
air.velocity = -6.9, -4.2
air.juggle = 3
air.fall = 1
down.velocity = -4,-6
down.hittime = 30
down.bounce = 0
envshake.time = 4
envshake.ampl = 4
palfx.time = 55
palfx.mul = 200, 200, 200
palfx.add = 100, 100, 200
palfx.sinadd = -120,-120,-120,10
fall = 1

Sig made by TempesT :)

Bastard Mami

are you 4 hits working properly, your current time% trigger is as good as writing trigger1=1 ?

about the explods just use movehit=1 as trigger.

The Lord of the Flies

Yes, the 4 hits work properly.

The only thing not working are the hitsparks, just spawning one of them.

Here's the entire coding:
Spoiler (click to show)
;---------------------------------------------------------------------------
;Kaiser Wave Helper
[StateDef 1032]
type = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 1032
juggle = 5
poweradd = 0
sprpriority = 4

[State 1032, VarSet]
type = VarSet
trigger1 = !Time
var(7) = Root,var(7)

[State 1032, HitDef]
type = HitDef
triggerall = var(7) = 1
trigger1 = !Time  ;Time = 1
attr = S,SP
hitflag = MAF
guardflag = MA
getpower = 0,0
givepower = 0,0
animtype = Hard
fall.animtype = Back
priority = 5,Hit
damage = 110,10
pausetime = 4,4
sparkxy = 10,-6
sparkno = -1
hitsound = S3,0
guardsound = S2,0
guard.sparkno = S6031
ground.type = Low
ground.slidetime = 26
ground.hittime  = 20
ground.velocity = -6.5, -4
air.animtype = Back
air.velocity = -4,-6
air.juggle = 3
air.fall = 1
down.velocity = -4,-6
down.hittime = 30
down.bounce = 0
envshake.time = 4
envshake.ampl = 4
palfx.time = 55
palfx.mul = 200, 200, 200
palfx.add = 100, 100, 200
palfx.sinadd = -120,-120,-120,10
fall = 1

[State 1032, HitDef]
type = HitDef
triggerall = var(7) = 2
trigger1 = Time % 1 = 0  ;HitDef
attr = S,SP
hitflag = MAF
guardflag = MA
getpower = 0,0
givepower = 0,0
animtype = Hard
fall.animtype = Back
priority = 5,Hit
damage = (110 - (uniqhitcount*60)),10
pausetime = 4,4
sparkxy = 10,-6
sparkno = -1
hitsound = S3,0
guardsound = S2,0
guard.sparkno = S6031
ground.type = Low
ground.slidetime = 26
ground.hittime  = 20
ground.velocity = -6.5, -4
air.animtype = Back
air.velocity = -6.9, -4.2
air.juggle = 3
air.fall = 1
down.velocity = -4,-6
down.hittime = 30
down.bounce = 0
envshake.time = 4
envshake.ampl = 4
palfx.time = 55
palfx.mul = 200, 200, 200
palfx.add = 100, 100, 200
palfx.sinadd = -120,-120,-120,10
fall = 1

[State 1031, HitDef]
type = HitDef
triggerall = var(7) = 3
trigger1 = Time % 1 = 0  ;HitDef
attr = S,SP
hitflag = MAF
guardflag = MA
getpower = 0,0
givepower = 0,0
animtype = Hard
fall.animtype = Back
priority = 5,Hit
damage = (100 - (uniqhitcount*35)),10
pausetime = 4,4
sparkxy = 10,-6
sparkno = -1
hitsound = S3,0
guardsound = S2,0
guard.sparkno = S6031
ground.type = Low
ground.slidetime = 26
ground.hittime  = 20
ground.velocity = -6.5, -4
air.animtype = Back
air.velocity = -6.9, -4.2
air.juggle = 3
air.fall = 1
down.velocity = -4,-6
down.hittime = 30
down.bounce = 0
envshake.time = 4
envshake.ampl = 4
palfx.time = 55
palfx.mul = 200, 200, 200
palfx.add = 100, 100, 200
palfx.sinadd = -120,-120,-120,10
fall = 1

[State 1031, HitDef]
type = HitDef
triggerall = var(7) = 4
trigger1 = Time % 1 = 0  ;HitDef
attr = S,SP
hitflag = MAF
guardflag = MA
getpower = 0,0
givepower = 0,0
animtype = Hard
fall.animtype = Back
priority = 5,Hit
damage = (100 - (uniqhitcount*30)),20
pausetime = 4,4
sparkxy = 10,-6
sparkno = -1
hitsound = S3,0
guardsound = S2,0
guard.sparkno = S6031
ground.type = Low
ground.slidetime = 26
ground.hittime  = 20
ground.velocity = -6.5, -4
air.animtype = Back
air.velocity = -6.9, -4.2
air.juggle = 3
air.fall = 1
down.velocity = -4,-6
down.hittime = 30
down.bounce = 0
envshake.time = 4
envshake.ampl = 4
palfx.time = 55
palfx.mul = 200, 200, 200
palfx.add = 100, 100, 200
palfx.sinadd = -120,-120,-120,10
fall = 1

[State 1032, HitOverride]
type= HitOverride
trigger1 = 1
time = -1
attr = SCA,NP,SP,HP
stateno = 1032
ignorehitpause=1
[State 1032, HitBy]
type = HitBy
trigger1 = 1
time = -1
value = SCA,NP,SP,HP
ignorehitpause = 1

[State 1031, VelSet]
type = VelSet
trigger1 = (!Time)
x = IfElse(var(4)=3,10,IfElse(var(4)=2,10,10))
y = 0

[State 1031, AfterImage]
type = AfterImage
trigger1 = (Vel X != 0)
time = 9999999
timegap = 1
framegap = 2
length = 6
paladd = 0, 0, 0
palmul = .8, .8, .8
palcontrast = 128, 128, 128
trans = add
persistent = 0
ignorehitpause = 1
[State 1031, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1032, Sparks]
type = Explod
trigger1 = MoveHit=1&&NumTarget
anim = 6010+(random%8)
ID = 6000
sprpriority = 5
postype = p1
pos = 10,-6
removetime =- 2
ownpal = 1
facing = -1
ignorehitpause = 1
persistent = 0
pausemovetime = 100
supermovetime = 100

[State 1052, Flames]
type = Helper
trigger1 = MoveHit&&NumTarget
helpertype = Normal
stateno = 7000
ID = 7000
name = "Flames"
postype = p2
pos = 0,const(size.mid.pos.y)
bindtime = 1000
ownpal = 1
facing = IfElse(Random<500,1,-1)
size.ground.front = 0
size.ground.back = 0
size.xscale = .5
size.yscale = .5
ignorehitpause = 1
persistent = 0


[State 1032, ChangeState]
type = ChangeState
triggerall = var(7) = 1
trigger1 = MoveContact
value = 1033
[State 1035, ChangeState]
type = ChangeState
triggerall = var(7) = 2
trigger1 = HitCount >=2
trigger2 = MoveGuarded
value = 1033
[State 1036, ChangeState]
type = ChangeState
triggerall = var(7) = 3
trigger1 = HitCount >=3
trigger2 = MoveGuarded
value = 1033
[State 1036, ChangeState]
type = ChangeState
triggerall = var(7) = 4
trigger1 = HitCount >=4
trigger2 = MoveGuarded
value = 1033


[State 1032, DestroySelf]
type = DestroySelf
trigger1= FrontEdgeDist<-120 || BackEdgeDist<-120
;---------------------------------------------------------------------------
;Kaiser Wave Helper Finish
[Statedef 1033]
type = A
physics = N
movetype = I
anim = 9999
velset = 0,0
ctrl = 0
sprpriority = 4
movehitpersist = 1

[State 1033, Explod]
type = Explod
trigger1 = Time = 0
anim = 1033
ID = 1033
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = .5,.5
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause = 1

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

[State 1033, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime

Sig made by TempesT :)

Cyanide

you have persistent = 0 in the explod code, it won't trigger again. Change to movehit = 1 and remove persistent.


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.

The Lord of the Flies

...And also needed to set it to "ignorehitpause = 1".

Thx!

Sig made by TempesT :)