function foo()
local val = getObject(myanimation):getInt(VAnimationCurrentSpriteIndex)
--get the current frame index
if val >= 2 and val <= 20 then --range between frame 2 and 20
--do stuff
else
--do something else
end
end
setAnimFrames(animname, int , int)
function setAnimFrames(anim, first, last)
ActiveAnimations[anim].FirstFrame = first
ActiveAnimations[anim].LastFrame = last
end
local cond = getObject("Conditions[myCondition]") --- get the condition of myCondition
cond:setValue(VConditionValue, false) --if its true change to false
local valA =(Values["myValue"].Int ) -- get myValue's value
you only really need to query if the 2 characters are x distance apart. in theory if both characters are close enough together then it should count as an hit, no? You could then expand upon that further, by querying a state/condition/value, such as characters are close enough together, but was the receiving character blocking/ducking/jumping?
local benishere = getObject("Characters[Benny]"):getPoint(VCharacterPosition)
print(benishere.x, benishere.y)