Turret Behavior: Is there a way to ID current target?

Get help using Construct 2

Post » Mon Nov 03, 2014 4:34 am

ie. A condition or filter that identifies the current target of a specific turret.

The one easy way I can think of, is to spawn a sprite line on target acquired and do a condition of line overlap/colliding with the target to toggle a target variable (isTarget = 0/1). But that would get extremely messy with more turrets.

Hmmm.... :?:
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Mon Nov 03, 2014 4:55 am

I wish it would get id, but for now it just gets uid, which you can store in a variable to use in picking.

You can also fake it by using pick closest, since thats basically how the turret works.

Keeping the id would mimic "first in range".
Just keep in mind the instance ids change when one is destroyed, not a real big deal if you know how that works.
Image ImageImage
B
168
S
50
G
169
Posts: 8,282
Reputation: 108,193

Post » Mon Nov 03, 2014 5:52 am

UID is work-able.

@newt Thanks. :)
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614


Return to How do I....?

Who is online

Users browsing this forum: plinkie, zenox98 and 15 guests