Move toward the player

Get help using Construct 2

Post » Fri Apr 05, 2013 7:29 pm

Hi all,

I'm working on a project that I need a bat to follow the player in order to attack him.

1) Follow the player [done]
2) Don't change the angle of the animation [incomplete]. the bat should fly in the horizontal at all times.
3) Subtract 1 from life [done]
4) Get close enough to hit the player [not good]
5) If you don't move, the bat will hit the player and the animation will go crazy [need to be fixed]

Here is the file
http://dl.dropbox.com/u/89812940/bat/bat-flying.capxjogosgratispro2013-04-05 19:30:23
B
85
S
31
G
22
Posts: 384
Reputation: 18,587

Post » Fri Apr 05, 2013 11:58 pm

Change the bullet 'set angle' property to 'no'. And in your events: change 'bat: set angle' to 'bat: set angle of motion' with the value angle(bat.x, bat.y, mainPlayer.x, mainPlayer.y).
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,000

Post » Sat Apr 06, 2013 1:20 am

What @ramones said :)
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418

Post » Sat Apr 06, 2013 1:02 pm

@ramones You are the guy!
B
85
S
31
G
22
Posts: 384
Reputation: 18,587


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Artpunk, indiegrimes, NRABrazil, PixelatedTrip and 28 guests