if degree value is more than or equal to a and less than or equal to b then
start animation (some animation)
elseif ...
local char = game:getLink(VGameCurrentCharacter)
function checkDir()
-- East
if char:getInt(VCharacterDirection) >= 0 and char:getInt(VCharacterDirection) <= 44 then
startAnimation("Animations[add animation name here]")
-- North East
elseif char:getInt(VCharacterDirection) >= 45 and char:getInt(VCharacterDirection) <= 89 then
startAnimation("Animations[add animation name here]")
-- North
elseif char:getInt(VCharacterDirection) >= 90 and char:getInt(VCharacterDirection) <= 134 then
startAnimation("Animations[add animation name here]")
-- North West
elseif char:getInt(VCharacterDirection) >= 135 and char:getInt(VCharacterDirection) <= 179 then
startAnimation("Animations[add animation name here]")
-- West
elseif char:getInt(VCharacterDirection) >= 180 and char:getInt(VCharacterDirection) <= 224 then
startAnimation("Animations[add animation name here]")
-- South West
elseif char:getInt(VCharacterDirection) >= 225 and char:getInt(VCharacterDirection) <= 269 then
startAnimation("Animations[add animation name here]")
-- South
elseif char:getInt(VCharacterDirection) >= 270 and char:getInt(VCharacterDirection) <= 314 then
startAnimation("Animations[add animation name here]")
-- South East
elseif char:getInt(VCharacterDirection) >= 315 and char:getInt(VCharacterDirection) <= 359 then
startAnimation("Animations[add animation name here]")
end
end