Home   Help Search Login Register  

Author Topic: how to get the nearest unit to the player?  (Read 526 times)

0 Members and 1 Guest are viewing this topic.

SpawnFodder

  • Guest
how to get the nearest unit to the player?
« on: 31 May 2005, 10:01:38 »
i have been trying to find a way to get a script to detect the nearest enemy unit to the player, and ideally the nearest unit of a certain type.  does anyone know of a command to do this.  the nearest i have found was the nearestobject command, but that doesnt seem to work on units.

voodzia

  • Guest
Re:how to get the nearest unit to the player?
« Reply #1 on: 31 May 2005, 11:14:32 »
You need command distance for that. Check official command reference for more info.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:how to get the nearest unit to the player?
« Reply #2 on: 31 May 2005, 12:32:12 »
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

SpawnFodder

  • Guest
Re:how to get the nearest unit to the player?
« Reply #3 on: 31 May 2005, 18:01:26 »
that function was the kind of thing i was looking for

thanks