YesNoOk
avatar

2 hitdef in 1 tick (Read 1167 times)

Started by tem(A), March 18, 2014, 08:34:45 am
Share this topic:
2 hitdef in 1 tick
#1  March 18, 2014, 08:34:45 am
  • avatar
  • *
    • sprite-ripper.narod.ru
hi there
have this code



[State 620, air]
type = HitDef
trigger1 = !movecontact
attr = A, NA
damage    = 30*ceil(ifelse(p2movetype = A,1.5,1)),1
animtype  = Back
hitflag =AF
guardflag = A
p2facing = 1
pausetime = 0,0
sparkno = 401
sparkxy =-30-floor(random/100)*4,-100-floor(random/100)*4
air.velocity = -10,25
yaccel = 1
air.fall = 1
fall.recover = 0
kill       = 0
fall.kill  = 0
guard.kill = 0
getpower = 10,100
givepower = 100, 10
priority = 3, Hit
fall.damage=20

[State 620, ground]
type = HitDef
trigger1 =!movecontact
attr = A, NA
damage    = 30*ceil(ifelse(p2movetype = A,1.5,1)),1
animtype  = hard
hitflag = M
guardflag = M
p2facing = 1
pausetime = 0,0
sparkno = 401
sparkxy =-30-floor(random/100)*4,-100-floor(random/100)*4
guard.sparkno = 400
ground.type = High
ground.slidetime = 25
guard.ctrltime = 20
ground.hittime  = 25
ground.velocity = -10, 0
air.velocity = -10,25
yaccel = 1
fall = 0
kill       = 0
fall.kill  = 0
guard.kill = 0
getpower = 10,100
givepower = 100, 10
priority = 3, Hit
p1stateno=52


1 hitdef for air hit, second for ground. and finaly working only second - ground hitdef. i can rechange position = put ground hitdef in first place and then air hitdef will work. how can i make workable both hitdefs in same time?

changing thigers
first hitdef trigger1 = time = 4
second hitdef trigger1 = time = 5
working fine!


first hitdef trigger1 = time = 4
second hitdef trigger1 = time = 4
doesnt work

hlp
Re: 2 hitdef in 1 tick
#2  March 18, 2014, 04:47:48 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
You can't, you can only have a single Hitdef active at any given time. The moment the second Hitdef takes effect, it overwrites the first.
Re: 2 hitdef in 1 tick
#3  March 18, 2014, 05:17:49 pm
  • avatar
  • *
    • sprite-ripper.narod.ru
okey
Re: 2 hitdef in 1 tick
#4  March 18, 2014, 09:53:19 pm
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr
Well..... You can techically can, but it requires a helper method. Here's what I mean.

What you would need to do is create a helper always binded/positioned on to player, have the same animation actions as player, and force it's animation frame to player's current frame.

From here, you can activate the players single hitdef, and have the helpers hitdef attack when you need it to.

"You must defeat my flaming
dragon punch to stand a chance."
Re: 2 hitdef in 1 tick
#5  March 18, 2014, 10:20:39 pm
  • *****
    • Peru
You can also use a projectile. It's easier, but it could screw some code / hitoverrides based on attacks or projectiles.
Re: 2 hitdef in 1 tick
#6  March 19, 2014, 03:12:39 pm
  • avatar
  • *
    • sprite-ripper.narod.ru
right. i just wanted to easy divide hitdef to AIR & GROUND hidefs and kickout from triggers p2state or enemynear,blabla and be happy in 2-2 matches. in teory it was nice thing, but practicaly not.
anyway thx to every1. lookslike i put triggers back