How do I test if a Platformer object changes direction

Get help using Construct 2

Post » Fri Feb 05, 2016 5:02 am

Hi all,
I'd like to know if there is a way I can check if an object with the platformer behavior changes its direction. Note that this object is not controlled by the arrow keys, it's an enemy, so detecting a direction change would not work by checking for arrow key presses.

Thanks.
B
5
Posts: 20
Reputation: 267

Post » Sat Feb 06, 2016 9:08 pm

bump
B
5
Posts: 20
Reputation: 267

Post » Sat Feb 06, 2016 9:38 pm

With an instance variable. I set left to -1 and right to 1 ( i do this because I use those values for calculating
But you could have 0 and 1 respectively

if the enemy sprite is mirrored then value a
else if its not mirrored then value b
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Sun Feb 07, 2016 2:00 am

But the enemy sprite doesn't mirror, it constantly faces the same direction. (To make the sprite mirror on direction change was the reason I wanted to test if the sprite changes direction)
B
5
Posts: 20
Reputation: 267


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 2 guests