Jump to content
Sign in to follow this  
ManDay

Best way to control security

Recommended Posts

I always made great scripts (imho biggrin_o.gif) 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

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×