Skip to main content

Report this content

We want the Dreams coMmunity to be a safe, diverse and tolerant place for everyone, no matter their age, gender, race, sexual orientation or otherwise. If you believe this content to contradict these principles, you can file a report for our coMmunity teams to investigate.

Note that misuse of the reporting tool will not be tolerated.

Item being reported:

A forum post by StankyDino

Cool, So I've done this before.

On your targets that you want to select, have a tag called Enemy Transform. You can adjust the position of where the tag's position is when you select it and it gives you the little xyz gizmo in worldspace, if you want all tags center-of-mass.

Set a Sphere Zone Trigger on your player with a falloff radius of whatever you want the range to be, and set it to detect Enemy Transform. For each of the potential targets in range, this will activate that tag, but the falloff will determine how strong the signal from each of the tags is.

Back on the Enemy, Wire Enemy Transform's output into an Exclusive gate named Nearest Filter. Set it to be able to interrupt (the little lightning bolt icon in Tweak menu).
What this does is that it only allows one gate at a time to be open, and that gate will be the one with the strongest signal, (closest to you).

Then, wire the output of the Gate into a tag called My Nearest Target.
Now you can search for the position of THIS tag, and there will only be one of them active in the scene.

Oh dear! Your browser is either unsupported or there has been a problem loading the page.