8-Direction Movement in relation to Display Angle

For questions about using Classic.

Post » Wed Jan 09, 2013 7:32 am

I'm having trouble getting 8-directional movement to work when the display angle changes. As the display angles change, the axis still remain the same. Therefore when display angle is shifted 90 degrees, and when down is pressed, the sprite moves right. I want it to move down.

I've tried my luck at making an event. I set the event to: when button down set sprite angle to a particular direction and then move in that direction. That seemed to have worked. But I don't want to use that since it lacks the flexibility and realism of the 8-directional movement and to top it off, when moving diagonally, the player doesn't look at the diagonal direction. It just looks down.

Anyway to get this to work?
Posts: 9
Reputation: 293

Post » Wed Jan 09, 2013 1:29 pm

I'm not certain if this solution will help you at all, but I had a situation where I couldn't figure out how to control 8-directional movement manually so the sprite wouldn't flip. I also couldn't figure out how to make the sprite respond correctly to angle-changing events.

Eventually, I figured out a way to do it using TimeDelta instead, forcing a set animation so that the exact animation I want to play will only play when a commanded angle is running:


^^^ I've only set 45 degrees and 320 degrees to work; I never finished the other angles just because I didn't need it right that moment, I just needed to test the event concept to see if it worked... and it does
Posts: 426
Reputation: 2,458

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest