Enemy shoots at player position

Get help using Construct 2

Post » Wed Jul 08, 2015 1:00 am

How do i make the enemy shoot at player position in every angle, and use a animation, for example
Image
Angle 1

Image
Angle 2

Image
Angle 3

Image
Angle 4

I'm new in this engine, and i dont know how to do some things, is there any solution to this?
B
4
Posts: 13
Reputation: 226

Post » Wed Jul 08, 2015 2:21 am

On some condition > Tank>Spawn Bullet
____________________________>Bullet> angle(self.X, Self.Y,Target.ImagePointX(0),Target.ImagePointY(0))

The Target being the guy with the gun and the Bullet having the bullet behavior.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Wed Jul 08, 2015 4:00 pm

TheDom wrote:On some condition > Tank>Spawn Bullet
____________________________>Bullet> angle(self.X, Self.Y,Target.ImagePointX(0),Target.ImagePointY(0))

The Target being the guy with the gun and the Bullet having the bullet behavior.

But how i make the tank rotate to the player using different sprites/animations
B
4
Posts: 13
Reputation: 226

Post » Wed Jul 08, 2015 4:34 pm

You can define the animation of the turret ( or barrel and turret ; depends on your animations and yours sprite ) depending on the angle that there is between the tank and the target.
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320


Return to How do I....?

Who is online

Users browsing this forum: Fradno, marcinkowski, tarek2 and 11 guests