ManDay 0 Posted June 28, 2007 I always made great scripts (imho ) which simulate bodyguards and security TFs. As ArmA offers new commands I am currently looking for the most effective way to check whether a group feels endangered. Atm I guess moving a trigger arround them - (onact: enemy discovered by friend) is the best way. suggestions? Share this post Link to post Share on other sites
Second 0 Posted June 28, 2007 Neartargets? which gives array of all vehicles and men inside given radius. Not much different than using suitable trigger... So i would go with trigger. But neartargets seems to have some intresting values that it returns, like that cost value that it returns. Share this post Link to post Share on other sites
General Barron 0 Posted June 28, 2007 See this topic: http://www.flashpoint1985.com/cgi-bin....t=63847 Share this post Link to post Share on other sites
5133p39 16 Posted June 28, 2007 I think the findNearestEnemy command would suffice. You can easily find when the group feels endangered - the findNearestEnemy will return some enemy unit, instead of null object which it returns when they don't know about any enemy. Share this post Link to post Share on other sites
ManDay 0 Posted June 29, 2007 Great, thanks. Sometimes I'm not as familiar with the new ArmA scripting commands (especially the ...nearest... stuff - which is great). Slightly changing the topic: is there a mix of "nearestTargets" and "findNearestEnemy". Since nearestTargets returns a huge list of evrything arround the unit its just too much. FindNearestEn meanwhile returns only the enemy itsself and doesnt provide any further information on the things covered by NearestTargets (estimated position ... etc.) Is there performance saving way to get those values from a single object? Actually I doubt that as nearestTargets should be a basic component of the AI system. any ideas beside a loop? Share this post Link to post Share on other sites