UnitAreasOnMap Script // Easy to use

unitAreasOnMapScript

Download: unitAreasOnMapScript

This script mark areas, when units in the area, on the map. The background was for missiontasks like “clear city xy of all enemy forces” to avoid to search 15 minutes for the last enemy in the city.

Example video:

Some theory first:

How the script works?

1. The script is checking the parameters passed to it (Array or TriggerObject)
2. Checking allUnits in the TriggerArea / checking allUnits on the map if an array is passed – and add the sectors with units in to an array
3. Checking all sectors in the array with already placed areaMarkers to avoid unneeded marker deletion / creation
4. Delete all sectorMarkers where no longer units in
5. Create new sectorMarkers for new sectors with units in
6. Sleep x seconds and restart at point 2

How to use it:

The use is very easy, copy the following into a trigger and adjust the parameters if you like:

Parameters !?

Version 1.1 with TriggerObject:
unitAreasOnMapScript
Version 1.2 with TriggerObject:
unitAreasOnMapScript

Ingame, click to enlarge:
unitAreasOnMapScript

Version 2.1 with Array (no need to use a trigger with this version, here you can place the code where you want, script, init, init of unit …..):
unitAreasOnMapScript
Version 2.2 with Array:
unitAreasOnMapScript

Q: Parameter MarkerCorrection?
A: If you use Custom islands like A3MP, there is often a fault in the position system. Sectors often don’t start at a pos like [5500,5500], there are grid-movements in the Y-direction. So you can adjust this fault with the Paramter. For A3MP Map Chernarus [ 0 , -40] should to the job.

Q: What happen if two factions in one sector?
A: Two sectorMarkes will be created so the color of the sector will mix up on the map.

Q: How many Triggers with this script can i place on the Map, performancequestion?
A: The script should have a low performance impact, so no worry for the amount of placements. If you find a limit or a huge performance impact, let me know :)

Q: AreaColor?
A: Take a look at: LINK, you can use all colors. Only write the part after “color”, for “colorRed” write “red”, for “colorBlue” write “blue”, for “Color1_FD_F” wite “1_fd_f”

Q: AreaMarkerLifeTime(FadeTime)?
A: This is the time it takes for the areaMarker to disappear. If the AreaMarkerLifeTime is bigger than the RefreshTime the AreaMarkerLifeTime will set to 0 what equals NoFade.

Q: Why is the script an one unreadable long line?
A: I’ve compressed the script with ArmaResourceOptimizator by Leopotam

How it looks ingame in the editor and on the Map:
1 Trigger – TriggerActivation Bluefor – TriggerParameters [ thisTrigger ]
http://abload.de/img/2015-02-16_00009meuy2.jpg (415 kB)
http://abload.de/img/2015-02-16_00010seu8h.jpg (566 kB)

4 Triggers:
- 1. TriggerActivation Blufor – TriggerParameters [ thisTrigger, 1, [0,0], “blue”, 0.6 ]
- 2. TriggerActivation Opfor – TriggerParameters [ thisTrigger, 1, [0,0], “red”, 0.6 ]
- 3. TriggerActivation Independent – TriggerParameters [thisTrigger,1,[0,0],”green”,0.6]
- 4. TriggerActivation Civilian – TriggerParameters [ thisTrigger, 1, [0,0], “civilian”, 0.6 ]
http://abload.de/img/2015-02-16_00005k5u9r.jpg (223 kB)
http://abload.de/img/2015-02-16_0000791uez.jpg (251 kB)
http://abload.de/img/2015-02-16_00004aajar.jpg (128 kB)

1 Trigger – TriggerActivation Opfor – TriggerParameters [ thisTrigger ] – A3MP Chernarus without markerCorrection Parameter
http://abload.de/img/2015-02-16_00011riu6e.jpg (273 kB)
http://abload.de/img/2015-02-16_000126vu0x.jpg (702 kB)

1 Trigger – TriggerActivation Opfor – TriggerParameters [ thisTrigger, 1, [ 0 , -40 ], “red”, 0.6 ] – A3MP Chernarus with markerCorrection Parameter
http://abload.de/img/2015-02-16_00013fvusf.jpg (208 kB)
http://abload.de/img/2015-02-16_00015nuuf9.jpg (706 kB)

example mission: unitAreasOnMapScript
Readable version of the script: unitAreasOnMapScript

You can skip to the end and leave a response. Pinging is currently not allowed.

7 Responses to “UnitAreasOnMap Script // Easy to use”

  1. blackbeard says:

    Hey, nice script, however is there mod support? I’ve notice that the script reconizes vanilla units only. Any ideas on a fix?

  2. Godfather says:

    Great work !

  3. Godfather says:

    Hmmm strange as got no PM :(

  4. Godfather says:

    LOL yep NP mate :)

Leave a Reply to blackbeard