How do I Custom Movement Angle Away From Object

Get help using Construct 2

Post » Tue May 13, 2014 2:29 am

The enemies in my top-down game are moved using the custom movement behavior. One of the characters' abilities is a knockback. I need the enemy to be knocked away from the character in all directions.
First I tried setting the angle towards the character, then adding 180 to the angle. That made the enemies all just move to the left.
Image

I then tried using an object that determined the direction the enemy was facing (I already use this object for attacking) and then setting custom movement based on that
Image

Is there an easier way to make an object face away from another object? I feel like I'm doing this in an extremely wrong and convoluted way.
B
19
S
5
G
1
Posts: 96
Reputation: 2,710

Post » Tue May 13, 2014 2:58 am

If you want to just knock them away , what about the custom movements reverse action ?

Reverse
Inverts the movement by flipping the signs of dx and dy.
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

Post » Tue May 13, 2014 3:43 am

I did not know that was a thing!
Thank you!
B
19
S
5
G
1
Posts: 96
Reputation: 2,710


Return to How do I....?

Who is online

Users browsing this forum: Armench, Jackriduk, kiki4construct and 30 guests