How do I Make a Turret Shoot at Multiple Targets

Get help using Construct 2

Post » Sat Jul 04, 2015 8:43 am

Hey all.

I'm playing around with a tower defense game, and I'm trying to have a turret target all enemies within a range of 100 pixels and shoot a "bullet" at them when the turret is clicked. This bullet is actually a spider-thing that will do damage over time to the enemy, so I want the turret to only target the enemies that don't already have a spider-thing on them.

Any ideas?

Thanks.
B
8
S
2
Posts: 35
Reputation: 572

Post » Sat Jul 04, 2015 11:01 am

Add to the turret the LOS behavior. Set it to spaw a projectile only once for each enemy in range that does not have the spider over it.
Just write the events just like you told us you want them and it should work
B
17
S
7
Posts: 277
Reputation: 2,514

Post » Sat Jul 04, 2015 5:04 pm

This might do the trick for you.

It compares the distance between itself and its target(s) - if they have not been hit, it will shoot.

If the target is hit, it will wait 5 seconds before it can be hit again.

Example
Image

Capx
The Spider Turret
B
16
S
8
G
1
Posts: 153
Reputation: 2,554

Post » Sat Jul 04, 2015 10:19 pm

Thanks all! I'll try them out and see how they work!
B
8
S
2
Posts: 35
Reputation: 572

Post » Fri Sep 15, 2017 3:47 pm

CrudeWall wrote:This might do the trick for you.

It compares the distance between itself and its target(s) - if they have not been hit, it will shoot.

If the target is hit, it will wait 5 seconds before it can be hit again.

Example
Image

Capx
The Spider Turret


@CrudeWall
can you upload again? thanks
B
10
S
4
G
2
Posts: 169
Reputation: 2,324


Return to How do I....?

Who is online

Users browsing this forum: rayolf and 10 guests