hitcount

Started by YoungSamurai5, December 22, 2012, 12:20:09 AM

Previous topic - Next topic

YoungSamurai5

i have a problem with a hyper, i have a rock fx helper and i put a timemod on it which make a bunch appear (which i wanted) thats hits p2 in the air and have them bounce off the wall. but if you do this hyper in the corner then the rock fx will kill p2 considering the damage it takes. i was wondering if there was some way where you can make the damage of the helper 0 if it hits more than once. ill post a video if you cant understand what im saying, i know my explanation sucks

Spoiler (click to show)

rock fx is state 3042

[StateDef 3041]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3041
poweradd = 96

[State 3041, Helper]
type = Helper
trigger1 = timemod = 3,1
helpertype = normal ;player
name = "ground"
ID = 3042
stateno = 3042
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

[State 3041, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal ;player
name = "ground"
ID = 3042
stateno = 3042
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0


[State 3041, Explod]
type = Explod
trigger1 = animelem = 2
anim = 8989
ID =  8989
pos = -60,14
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 5
vel = 0,0
accel = 0,0
random = 5,15
removetime = -2
pausemovetime = 0
scale = .75,.75
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0


[state 3041, Dash]
type = velset
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
x = 40


[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
;value2 = S,NA
time = 32
;ignorehitpause =
;persistent =

[State 3041, back to stance]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[StateDef 3042]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3042
poweradd = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
;value2 = S,NA
time = 32
;ignorehitpause =
;persistent =

[State 3042, 1]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = S, NA
damage = 370, 15
getpower = 0,0
givepower = 200,20
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,0
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 0
guardsound = 6, 0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -13,-10
guard.velocity = -13
air.velocity = -13,-10
airguard.velocity = -13, -10
fall = 1
p2stateno = 1025
envshake.time = 15
envshake.ampl = 15


[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger4 = animelem = 4
time = 15
freq = 60
ampl = 15
phase = 90
;ignorehitpause =
;persistent =


[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause =
;persistent =
mugen or nothin


Noctis

#1
So you're spawning multiple helpers at once, but you want them to stop doing damage when at least one of the helpers hits?

Get rid of !movehit and !moveguarded triggers. Waste of space. Just use !movecontact.

In your [-2 statedef].
[State -2] ;This is the var reset for when you helper no longer exists. !numhelper(3402) is the same as saying helper 3042 does NOT exist.
type = VarSet
trigger1 = !NumHelper(3042)
var(10) = 0

[State -2] ;If your helper exists, this sets the var to 1 if that helper has made contact with the opponent.
type = VarSet
trigger1 = numhelper(3042)
trigger1 = helper(3042),MoveContact
var(10) = 1

In your helper.
[State 3042, StateTypeSet];This changes the A movetype to I which makes it impossible to hit once it's hit once.
type = StateTypeSet
trigger1 = Root,Var(10)
movetype = I

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

YoungSamurai5

Quote from: Noctis on December 22, 2012, 01:34:23 AM
So you're spawning multiple helpers at once, but you want them to stop doing damage when at least one of the helpers hits?


yes exactly.

i tried it out and it didnt work. also its state 3042 instead of 3402, but that wasnt the problem. i have no idea why its not working.
mugen or nothin


Noctis

It works fine. Post how you did it.

Edit:
Are you using an existing var? Make sure it's a var that's not being used.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Infinite Daze

#4
Try this,

;inside move statedef
[State xxx, Reset]
type = VarSet
trigger1 =!time
var(x)=0
ignorehitpause =1



;inside helper
[State xxx, ParentVarSet]
type = ParentVarSet
trigger1 =movehit=1
var(x)=1
ignorehitpause =1
[State xxx, ParentVarRead]
type = VarSet
trigger1 =!time
var(x)=root,var(x)
ignorehitpause =1

;hitdef trigger
triggerall=!var(x)
trigger1=!time

Noctis

^ No. I just tested that and the enemy gets hit a bunch of times before it the hitdef even reads the var.
What I posted works.

Show what you did, samurai.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Infinite Daze

Should work if everything is placed correctly.

YoungSamurai5

i made sure var10 wasnt being used already

Spoiler (click to show)
Quote
[StateDef 3041]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3041
poweradd = 96

[State 3041, Helper]
type = Helper
trigger1 = timemod = 3,1
helpertype = normal ;player
name = "ground"
ID = 3042
stateno = 3042
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

[State 3041, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal ;player
name = "ground"
ID = 3042
stateno = 3042
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0


[State 3041, Explod]
type = Explod
trigger1 = animelem = 2
anim = 8989
ID =  8989
pos = -60,14
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 5
vel = 0,0
accel = 0,0
random = 5,15
removetime = -2
pausemovetime = 0
scale = .75,.75
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0


[state 3041, Dash]
type = velset
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
x = 40


[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
;value2 = S,NA
time = 32
;ignorehitpause =
;persistent =

[State 3041, back to stance]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[StateDef 3042]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3042
poweradd = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
;value2 = S,NA
time = 32
;ignorehitpause =
;persistent =

[State 3042, StateTypeSet]
type = StateTypeSet
trigger1 = Root,Var(10)
movetype = I

[State 3042, 1]
type = HitDef
trigger1 = !movecontact
attr = S, NA
damage = 370, 15
getpower = 0,0
givepower = 200,20
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,0
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 0
guardsound = 6, 0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -13,-10
guard.velocity = -13
air.velocity = -13,-10
airguard.velocity = -13, -10
fall = 1
p2stateno = 1025
envshake.time = 15
envshake.ampl = 15


[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 2
trigger2 = animelem = 3
trigger4 = animelem = 4
time = 15
freq = 60
ampl = 15
phase = 90
;ignorehitpause =
;persistent =


[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause =
;persistent =


and i put this in state -2

; ground fx
[State -2]
type = VarSet
trigger1 = !NumHelper(3042)
var(10) = 0

[State -2]
type = VarSet
trigger1 = numhelper(3042)
trigger1 = helper(3042),MoveContact
var(10) = 1

im gonna test out childish method as well in a sec
mugen or nothin


Infinite Daze

#8
I got it to work in KFM using his wood block, here is everything put together.

[StateDef 3041]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3041
poweradd = 96

[State xxx, Reset]
type = VarSet
trigger1 =!time
var(7)=0
ignorehitpause =1

[State 3041, Helper]
type = Helper
trigger1 = timemod = 3,1
helpertype = normal ;player
name = "ground"
ID = 3042
stateno = 3042
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

[State 3041, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal ;player
name = "ground"
ID = 3042
stateno = 3042
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

[State 3041, Explod]
type = Explod
trigger1 = animelem = 2
anim = 8989
ID =  8989
pos = -60,14
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 5
vel = 0,0
accel = 0,0
random = 5,15
removetime = -2
pausemovetime = 0
scale = .75,.75
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[state 3041, Dash]
type = velset
trigger1 = animelem = 1| animelem = 2|animelem = 3
x = 40

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause=1

[State 3041, back to stance]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[StateDef 3042]
type = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3042
poweradd = 0

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
ignorhitpause=1
[State xxx, ParentVarSet]
type = ParentVarSet
trigger1 =movehit=1
var(7)=1
ignorehitpause =1
[State xxx, ParentVarRead]
type = VarSet
trigger1 =!time
var(7)=root,var(7)
ignorehitpause =1

[State 3042, 1]
type = HitDef
triggerall=!var(7)
trigger1=!time
attr = S, NA
damage = 370, 15
getpower = 0,0
givepower = 200,20
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0,0
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 0
guardsound = 6, 0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -13,-10
guard.velocity = -13
air.velocity = -13,-10
airguard.velocity = -13, -10
fall = 1
p2stateno = 1025
envshake.time = 15
envshake.ampl = 15

[State 0, EnvShake]
type = EnvShake
trigger1 = animelem = 2|animelem = 3|animelem = 4
time = 15
freq = 60
ampl = 15
phase = 90
;ignorehitpause =
;persistent =

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !animtime




If you want them to not be able to show up after the hit all together, use this version.

[State 3041, Helper]
type = Helper
trigger1 =!var(7) && timemod = 3,1
helpertype = normal ;player
name = "ground"
ID = 3042
stateno = 3042
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

YoungSamurai5

i got it solved from your first post childish, thanks alot man :)

thanks alot to both of you guys

edit: i like how you organized my code all neat and nice with the triggers for the dash and env shakes haha. just stuck with var10 as well, nice round number lol
mugen or nothin


Noctis

#10
It makes no sense why what I posted failed to work. I tested it many times using YOUR helper. But, as long as you figured it out.

Edit:
Okay. I thought there was only one helper. This second one was why it wasn't working and I cannot get it to stop hitting twice. Whatever. Good luck on your project.

[State 3041, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal ;player
name = "ground"
ID = 3042
stateno = 3042
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."