OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: SpawnFodder 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.
-
You need command distance for that. Check official command reference for more info.
-
Try this function here:
http://ofpec.com/editors/funcref.php?filter_func=48
-
that function was the kind of thing i was looking for
thanks