Is there a way to refer to all objects of a certain type when using the "nearestObject" command? I.e. would you be able to find the nearest soldier of any type (grenadier, medic, officer, et.al.)? How about the nearest static object of any type (bush, ammo box, tree, et.al.)?
It would be EXTREMELY helpfull if somebody knew how to do this. I need this for a couple scripts I'm making. One of them will make the closest soldier get up and man a specified MG when its gunner dies. Another is going to be a script that makes the AI lay suppressive fire while a man sprints forward towards cover, then he lays fire while the next man moves forward, etc.
I hope there is a simple way to do this. Right now I can only refer to a specific object, i.e. "SoldierWB", but I want to refer to all soldiers, etc. Any help would be greatly appreciated.
Thanks!