Optional Target?

So, in my game, I have an object that attacks 2 different objects, how do I make it choose the closest one?

If you have the combat figured out, then make the proximity blocks your’e already using and compare them using some gates OR filters. The lowest number goes to the combatz while the largest doesn’t.

You could either use a proximity or a raycast and the first input would be the closes enemy.
You can use a switch and turn it off from the first input.

Thats what I said Lol

I’m still new to flowlab, so, some visuals would help

if you can?

Que the @“JR 01”

Please leave a link to the game, I’ll see what I can do

Well, I have found 2 options:

  • You could simply just click “output closest objects” in the proximity menu:

1

  • Or do this complex arrangement:

2

Well, it’s actually for this game right here:
http://www.flowlab.io/game/play/1123161
I want the fighter to choose to attack which ever one is closest, the pusher or the enemy station @“JR 01”

I would assume that you do what @meburningslime said and filter out the lowest number and have it go after that.
Also, if you want that game reviewed you can always go to the Magma Manifesto again

The proximity can’t do 2 objects, to auto shoot 2 objects (and by which is the closer) is to create a timer rig to adjust when something isn’t close and one of the objects is stationary.

1st timer: 5 (repeat forever)
2nd timer: 5 (repeat of 1)
3rd timer 1 (repeat of 1)

56

didn’t they say fighter? not the player’s station? @“JR 01”

  1. IDK how to do that @MagmaDude100
  2. Your reviews are harsh Magma
  3. yeah, it looks like you selected the station

They aren’t that harsh, I did give you +2 pity points for it being incomplete, if ya want a re-review when your done, you can just ask

Thanks for clearing that up, but overall you’ll do the same thing.
I also added mailboxes IF the enemy station moves.

21

Thanks, but it doesn’t seem to work with the enemy station @“JR 01”

The enemy station should work similar to how I did the player station.
the numbers would be to the players location and the proximity set to fighter

What i mean is that the fighter doesn’t target the enemy space station @“JR 01”

So then, the Fighter would target the closest

Ah, it’s because I have the switches off when they should be on.
Here’s it again with the comparison of what you have already got down:

fix