Jump to content
davidoss

Find all markers in trigger area

Recommended Posts

HI

I am looking for  iterate trough  allmapmarkers array and pushback all indexes when marker in area trigger

 

Is there any way to do this?

Share this post


Link to post
Share on other sites

Something like this maybe?

_markers = allMapMarkers select {(getMarkerPos _x) inArea yourTrigger}
  • Like 1

Share this post


Link to post
Share on other sites

Next empty head:

 

I have a trigger and an array with object attached to its variable

Looking for  condition where trigger should fire

The problem is that the array attached it could be empty or not

The second problem is if the objects get destroyed and removed the array can be filed up with

[objectNull, objectNull,...]

 

I need to fire the trigger when array empty [] or all indexes are >objectnull<

(count ((thisTrigger getVariable 'dependency') select 2) == 0)

Share this post


Link to post
Share on other sites

({!isNull _x} count ((thisTrigger getVariable "depenency") select 2) == 0)

This should return false if there are any non-null objects in the array or return true if it is empty or only null objects present.

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

×