Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I'm currently trying to have an enemy follow my player when within a certain distance setting its direction based on its location compared the the players location which works fine the only problem is the animation the sprite changes animation when moving up or down but not when left or right even though its following the same set up any ideas on what the problem is and how I can fix it? I wish I could post a .capx but I can't
Probably the common issue of animations overriding where it's Y is always greater or less so it plays that animation and the left to right animations get overriden. Impossible to tell without any posted events though.
Develop games in your browser. Powerful, performant & highly capable.
I think that must be the problem it plays the left/right animation when I set to do so when moving up and down but then wont play the up/down animation when set to moving left and right, so whatever animation is set to play while moving up and down must be overriding the left and right animation is there anyway to change that
What are you using to move it, MoveTo? Pathfinding? 8-direction behaviour? use these to predict what animation to play, not its difference on x,y from the player. If simulating right or angle is 0 then play right etc.
Its using the 8-direction and its to move towards the player based on the X Y position which works perfect and the I have it set to play the different animation based on what angle its moving so if its moving is say 90 it plays the down animation if its -90 it plays the upward animation which works perfectly fine its also set to play the left/right animation when moving at a 0/180 angle but that does not work