Selecting targets for a turret?

Hey guys…

I was hoping someone might be able to help me figure out how to piece something together that I’m trying to do.

Here’s what I have. I have a bunch of different objects (enemies) that I want to be able to be targeted by an automatic gun or turret.

When the player clicks on one of the objects that tells the turret that they are a a valid target and can be shot at…but only if they’ve been clicked on.

I’m not sure how to do this. I don’t know how to pass some sort of “selected” state to the turret from different objects, or even instances of the same .

Confounding this further is the fact that the turret can only fire on targets that are within its view cone.

Any idea how to best approach this?
Thanks for any help on this.

Hi

Check these out and use what works

Thanks, man. I’ll have a run through those and report in :stuck_out_tongue:

Thanks a lot, m8. Those links helped immensely :slight_smile: