This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
Create point and click adventures without coding. The free version covers up to 25 scenes per project. For more scenes or to earn money with your game, you need a license.
See the Indie Bundle Try it for freeif 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