Jump to content
M1ke_SK

Map overlay in COOP mission

Recommended Posts

How to create selected operation area in COOP mission as in this picture ?

 

xessSBd.jpg

Share this post


Link to post
Share on other sites

1. Place a trigger that includes the area you want to be higlighted.

2. Place a game logic of the type "area" somewhere.

3. Place a module "Misc"->"Cover Map".

4. Synchronise the trigger with the game logic.

5. Synchronise the game logic with the module.

 

Done.

Share this post


Link to post
Share on other sites

1. Place a trigger that includes the area you want to be higlighted.

2. Place a game logic of the type "area" somewhere.

3. Place a module "Misc"->"Cover Map".

4. Synchronise the trigger with the game logic.

5. Synchronise the game logic with the module.

 

Done.

whether there is a version of the script?

Share this post


Link to post
Share on other sites

whether there is a version of the script?

It's no script. Just repeat the steps I provided you with in the editor. That's all.

Share this post


Link to post
Share on other sites

Anyway of making this show Eclipse areas instead of only squares / rectangles?

Share this post


Link to post
Share on other sites

Anyway of making this show Eclipse areas instead of only squares / rectangles?

Place multiple triggers with different shapes and sizes, sync each with a new location game logic and sync all those logics with the module. That should work. Haven't tested it though, it might look weird.

Share this post


Link to post
Share on other sites

Don't think I'll do that lol.

 

Seems like a lot of work for something that should work anyway.

Share this post


Link to post
Share on other sites

I've tried attachto'ing the trigger to the player in an effort to make the cover map move with the player, but it didn't move.

Share this post


Link to post
Share on other sites

I've tried attachto'ing the trigger to the player in an effort to make the cover map move with the player, but it didn't move.

Maybe spawning a new instance of the module on each frame would work? Just a wild guess.

Share this post


Link to post
Share on other sites

On each frame might be a bit overkillâ„¢. I might try running it twice a second or thereabouts.

Share this post


Link to post
Share on other sites

The coverMap is nothing more than 9 markers North,East,South and West relative to the trigger direction, a Mil Dot Square for each corner and a border for the area.

Mask markers

"bis_fnc_moduleCoverMap_0"

"bis_fnc_moduleCoverMap_90"

"bis_fnc_moduleCoverMap_180"

"bis_fnc_moduleCoverMap_270"

Corner markers

"bis_fnc_moduleCoverMap_dot_0"

"bis_fnc_moduleCoverMap_dot_90"

"bis_fnc_moduleCoverMap_dot_180"

"bis_fnc_moduleCoverMap_dot_270"

And border

"bis_fnc_moduleCoverMap_border"

 

Only the last trigger synced to the last Area synced to the module is taken into consideration for the area.

Triggers synced to the module can be used to turn the area on/off.

Or calling the modules script with false as param 2 will cause the markers created by the module to be deleted.

The function is BIS_fnc_moduleCoverMap and its parameters are [ module, nil, create ] where module is a reference to the coverMap module, param 1 is not used so nil and create is either true/false to create/delete coverMap markers.

 

So potentially you can get the zone to move by either calling the module function or deactivating the modules triggers to delete the markers, move the trigger and then call it/activate triggers to remake the area. Remember though these are global markers and would be updated on all machines.

 

Doing anything locally for MP e.g like getting the area to follow the player is going to be infinitely more problematic not only do you have to look after/recreate the markers locally you would also have to unsync the current area trigger and make a new local one to use. In which case it would quicker starting from scratch and writing your own local coverMap function rather than trying to false the current implementation to work locally.

  • Like 2

Share this post


Link to post
Share on other sites

The coverMap is nothing more than 9 markers North,East,South and West relative to the trigger direction, a Mil Dot Square for each corner and a border for the area.

Mask markers

"bis_fnc_moduleCoverMap_0"

"bis_fnc_moduleCoverMap_90"

"bis_fnc_moduleCoverMap_180"

"bis_fnc_moduleCoverMap_270"

Corner markers

"bis_fnc_moduleCoverMap_dot_0"

"bis_fnc_moduleCoverMap_dot_90"

"bis_fnc_moduleCoverMap_dot_180"

"bis_fnc_moduleCoverMap_dot_270"

And border

"bis_fnc_moduleCoverMap_border"

 

Only the last trigger synced to the last Area synced to the module is taken into consideration for the area.

Triggers synced to the module can be used to turn the area on/off.

Or calling the modules script with false as param 2 will cause the markers created by the module to be deleted.

The function is BIS_fnc_moduleCoverMap and its parameters are [ module, nil, create ] where module is a reference to the coverMap module, param 1 is not used so nil and create is either true/false to create/delete coverMap markers.

 

So potentially you can get the zone to move by either calling the module function or triggering the module to delete the markers, move the trigger and then call it/activate triggers to remake the area. Remember though these are global markers and would be updated on all machines.

 

Doing anything locally for MP e.g like getting the area to follow the player is going to be infinitely more problematic not only do you have to look after/recreate the markers locally you would also have to unsync the current area trigger and make a new local one to use. In which case it would quicker starting from scratch and writing your own local coverMap function rather than trying to false the current implementation to work locally.

I'm sure I'm not alone when I ask "How do you know all this stuff???" :) I can't find any online resources on this subject, even when I know the answer because you've given it! And this isn't the first time you've plucked a definitive answer from the ether with no apparent resources.  I'm not complaining, mind, just curious as to how you get this stuff! Do you happen to know tomorrows lottery numbers? :)

 

Seriously though, I'm grateful. As you say, it'd be quicker to write it myself and given the locality issue, it's work better than trying to move the markers manually.

Share this post


Link to post
Share on other sites
I'm sure I'm not alone when I ask "How do you know all this stuff???"

I just read through the unPBOed files find the modules scripts and read what they are doing. Unfortunately BIS have not got a function for tomorrows lottery numbers? :D

 

Quick SP function to make the coverMap follow and rotate with the player. Just make your coverMap as usual in the editor and run this from the debugConsole.

h = [ ] spawn {
    private ["_cmTrig"];
    _mapRadius = getNumber( configFile >> "CfgWorlds" >> worldName >> "mapSize" ) / 2;
    _mapCenter = [ _mapRadius, _mapRadius ];
    _cm = ( _mapCenter nearEntities [ "ModuleCoverMap_F", _mapRadius * 1.4142 ] ) select 0;
    {
        if (_x  isKindOf "LocationArea_F") then {
            {_cmTrig = _x;} forEach (_x call BIS_fnc_moduleTriggers);
        };
    } forEach (synchronizedObjects _cm);
    _cmArea = triggerArea _cmTrig;
    
    while { true } do {
        [ _cm, nil, false ] call BIS_fnc_moduleCoverMap;
        if ( alive player && visibleMap ) then {
            _cmArea set [ 2, getDir player ];
            _cmTrig setTriggerArea _cmArea;
            _cmtrig setPos getPos player;
            [ _cm, nil, true ] call BIS_fnc_moduleCoverMap;
        };
        sleep 0.1
    };
};
  • Like 4

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

×