How do I Determine Direction When Pathfinding?

Get help using Construct 2

Post » Mon Sep 22, 2014 9:13 pm

Hello All, thank you for looking :)

I'm using the Pathfinding command to move an enemy around the screen. How do I determine the direction it's moving so I can apply walking animations, etc?

Thanks
B
25
S
7
Posts: 79
Reputation: 2,267

Post » Mon Sep 22, 2014 9:48 pm

SOLUTION:

I found a solution. If I give the enemy an 8 direction Movement behavior (or Platform) then I can compare its MovingAngle in System and set the animations that way.
B
25
S
7
Posts: 79
Reputation: 2,267

Post » Mon Sep 22, 2014 9:53 pm

There's a couple of ways. Off the top of my head, you can use the sprite->angle property to tell which direction the sprite is facing and do a an event to check if the sprite has reached its destionation yet.
Developing Surolace, the survival role playing space game.

surolace-survival-role-playing-space-game_t116953
B
14
S
4
Posts: 303
Reputation: 1,730


Return to How do I....?

Who is online

Users browsing this forum: draiza and 18 guests