Home   Help Search Login Register  

Author Topic: nearest "type" of object  (Read 1194 times)

0 Members and 1 Guest are viewing this topic.

Offline Surdus Priest

  • Members
  • *
  • Only I can Forgive You!
nearest "type" of object
« 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?
Campaigns are hard, I'll stick with scripting for now!

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: nearest "type" of object
« Reply #1 on: 06 Nov 2007, 04:47:31 »
something like this...

Code: [Select]
_nObject = position player nearestObject "SoldierWB"
Xbox Rocks

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: nearest "type" of object
« Reply #2 on: 06 Nov 2007, 08:16:25 »
Regarding naming or renaming objects, there's a new ArmA command called 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.
"When 900 years YOU reach, look as good you will not!"