Jump to content
Sign in to follow this  
BlackAlpha

Add markers manually to ACM blacklist

Recommended Posts

I'm having loads of problems processing markers with the ACM blacklist function. Basically, I create a whole bunch of markers using a script and I add them to an array but nothing happens when I call the blacklist function.

Here's an example:

private ["_rnd", "_array1", "_array2"];

_rnd = "BLZ1";
createMarker [_rnd, (getmarkerpos "BLZ_CENTER1")];
_rnd setMarkerShape "RECTANGLE";
_rnd setMarkerSize [10000, 5000];
_array1 = [_rnd];
_array2 = blz + _array1;
blz = + _array2;
sleep 1;

//Process blacklist zones.
[bIS_ACM, blz] call BIS_ACM_blacklistAreaFunc;

The BLZ array in this example contains ["BLZ1"]. The marker is created exactly as dictated by the code. BIS_ACM is the name of the module. If I put a marker manually in the editor and add it to the BLZ array, it gets processed by the function just fine. If I add a marker pre-placed in the editor and a marker created using this script to the BLZ array, then only the marker that was pre-placed will get processed by the function.

Why is it not working with the above example? I'm completely lost on this one. It makes no sense... What am I missing?

Share this post


Link to post
Share on other sites

It could be that when the module is called at the start of the mission the marker isnt there so it isnt configured into the array, I have tried similar with synchronising a som module to a player during a mission. If this is the case then you would need to create the marker at the beginning of the mission or place it on the map then move it to the desired position later on.

Share this post


Link to post
Share on other sites

I tried that already. I've successfully added markers that were placed using the editor after the ACM module finished initializing, so it is possible to update the blacklist later on during a mission.

The problem seems to be that the markers I create with the script are somehow different from the markers placed in the editor or maybe the code I use is faulty.

I guess that the workaround would be to pre-place the markers in the editor and move them into position before forwarding them to the blacklist function. But that is such a cheap way of doing it.

Share this post


Link to post
Share on other sites

i dont know much about scripting but could it bee that in your code you definded BLZ1 and later on are looking for BLZ ?

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  

×