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: 280
Reputation: 2,522

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
19
S
10
G
2
Posts: 161
Reputation: 3,355

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: 198
Reputation: 2,384

Post » Wed Sep 27, 2017 4:35 pm

Hey - no sorry, I lost that file some time ago :(

marcinkowski wrote:
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
19
S
10
G
2
Posts: 161
Reputation: 3,355

Post » Wed Sep 27, 2017 7:59 pm

@marcinkowski

Maybe this little thing I just made could help :
Image
B
17
S
8
G
4
Posts: 473
Reputation: 6,221


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests