YesNoOk
avatar

GetHitVar problem (SOLVED) (Read 204 times)

Started by Kunu, September 06, 2010, 02:30:41 pm
Share this topic:
GetHitVar problem (SOLVED)
New #1  September 06, 2010, 02:30:41 pm
  • avatar
Hello. Trying out this piece of code but it doesn't work. It seems correct but the varadd doesn't trigger when the character guards an attack with fall.envshake.time=1.

Code:
[State -3]
type=VarAdd
trigger1=(stateno=[120,155])
fvar(1)=GetHitVar(fall.envshake.time)
ignorehitpause=1

And here's the attacking hitdef for reference.

Code:
[State 200, Punch Hitdef]
type = HitDef
trigger1 = AnimElem=3
attr = S, NA
damage = Ceil(50*(1-(var(2)*0.15))),0
animtype = Light
air.animtype=Back
guardflag = M
hitflag = MA
priority = 1, Hit
pausetime = 12, 12
guard.pausetime=12, 12
sparkno = 0
guard.sparkno=40
sparkxy = -10, -30
hitsound = S50, 0
guardsound = S50, 3
ground.type = High
ground.slidetime = 20
ground.hittime  = 8
ground.velocity = -2
air.type = High
air.hittime = 15
air.velocity = -5,-5
ground.cornerpush.veloff=0
p1sprpriority=1
p2sprpriority=0
getpower=20,10
givepower=20,10
persistent=0
yaccel=.5
fall.envshake.time=1
fall.envshake.freq=0
fall.envshake.ampl=0
fall.envshake.phase=0

Thanks in advance for any help.

-EDIT-

Solved. GetHitVar only returns the value of an attribute like fall.envshake.time if you're actually hit by the attack, it seems.
Last Edit: September 07, 2010, 03:18:48 am by Kunu