OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Surdus Priest on 05 Nov 2007, 02:46:06

Title: nearest "type" of object
Post by: Surdus Priest on 05 Nov 2007, 02:46:06
what i want to do is make a check for the nearest type of unit and then name or rename that unit.

anyone know how to do this?
Title: Re: nearest "type" of object
Post by: hoz on 06 Nov 2007, 04:47:31
something like this...

Code: [Select]
_nObject = position player nearestObject "SoldierWB"
Title: Re: nearest "type" of object
Post by: Wolfrug on 06 Nov 2007, 08:16:25
Regarding naming or renaming objects, there's a new ArmA command called setVehicleVarName (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=s#setVehicleVarName) which to me seems like what you need. I haven't however tried it, and I don't know if you like, have to compile (to remove the string) it or somesuch to be able to properly use it in commands like: vehicleVarName setPos (getpos nimporte_quoi)

But do try!  :scratch:

Wolfrug out.