Arma 3
Not enough ratings
How to sync Strategic Map Missions with Tasks
By Julian
How to script Stratergic Map Module in Arma 3 EDEN Editor and how to link it up with tasks.
   
Award
Favorite
Favorited
Unfavorite
Create Strategic Map Mission Script
1. Create in Notepad++ a new file and name it for example
"osm.sqf" (osm for open strategic map)
2. Insert in this file this code:

//Define a mission variable. mission1 = { /*----------------------------------------------------------------------------------------------- Define here the skript commands that should be executed when player clicks on the mission icon after he opened the strategic map module! ----------------------------------------------------------------------------------------------- Do not delete the variable below. It is needed for open the tasks! -----------------------------------------------------------------------------------------------*/ variableMission1Activated = true; //this variable will be true after player clicked on mission 1 in the strategic map }; /*----------------------------------------------------------------------------------------------- You can ad as many missions as you want! -------------------------------------------------------------------------------------------------*/ mission2 = { variableMission2Activated = true; }; mission3 = { variableMission3Activated = true; }; /*----------------------------------------------------------------------------------------------- How to place the missions on the strategic map: 1. Go to Eden Editor and copy the position to your clipboard where you want to show up the mission on the map 2. Paste the Position into [COORDINATES] [[COORDINATES],mission1,"TITLE","DECRIPTION","","IMAGE",1,[]]. 3. Insert the mission variable 4. TITLE will show the title of the mission on the map. 5. DESCRIPTION will show the description 6. If you want a Image displayed, insert at IMAGE the path to the image. Important: For each mission you must insert the line: [[COORDINATES],mission1,"TITLE","DECRIPTION","","IMAGE",1,[]]. ------------------------------------------------------------------------------------------------*/ _missionsData = [ [[COORDINATES],mission1,"TITLE","DECRIPTION","","IMAGE",1,[]], [[COORDINATES],mission2,"TITLE","DECRIPTION","","IMAGE",1,[]] ]; disableserialization; _parentDisplay = [] call bis_fnc_displayMission; //copy position where the strategic map should focus on to clipboard and paste it _mapCenter = [POSITION]; _ORBAT = []; _markers = []; _images = []; _overcast = overcast; _isNight = !((dayTime > 6) && (dayTime < 20)); _scale = 0.3; _simul = true; [ findDisplay 46, _mapCenter, _missionsData, _ORBAT, _markers, _images, _overcast, _isNight, _scale, _simul ] call Bis_fnc_strategicMapOpen; //Opens the map

3. Make sure you safed this as .sqf and not as ".sqf.txt"


Here an working example on stratis:
//Define a mission variable. mission1 = { variableMission1Activated = true; }; mission2 = { variableMission2Activated = true; }; _missionsData = [ [[6001.46,11077.6,0],mission1,"Test a","Description","","img\cover.jpg",1,[]], [[6077.76,10624,0],mission2,"Test b","Description 2","","img\cover.jpg",1,[]] ]; disableserialization; _parentDisplay = [] call bis_fnc_displayMission; _mapCenter = [6558,11101.8,0]; _ORBAT = []; _markers = []; _images = []; _overcast = overcast; _isNight = !((dayTime > 6) && (dayTime < 20)); _scale = 0.3; _simul = true; [ findDisplay 46, _mapCenter, _missionsData, _ORBAT, _markers, _images, _overcast, _isNight, _scale, _simul ] call Bis_fnc_strategicMapOpen;

That should be look like this:

How to connect the osm.sqf skript in the editor with the map.
1. Trigger Based
1.1 Create a Trigger.
1.2 Set "Activation: Bluefor or Any Player
1.3 Set Activation Type: "Present"
1.4 Set Position
1.5 Insert at the field: On Activation
execVM"osm.sqf";
Should look like this:

2. Object Based
2.1 Create Object (for e.g. a "Notice Board"
2.2 Write in the Object Init Field:
this addAction ["Open Strategic Map", "osm.sqf"];

Create in Editor Task Module , SetTastState Module and trigger.
1. Create a Task Module
2. Create a Set Task State Module
3. Sync in Editor the Module:
4. Create a trigger. Insert in the condition the missionvariable defined in the osm.sqf skript


Should look like this:

So what happens:
Trigger fires at the moment the variable variablemission1Activated gets true and starts the task.
It gets true because we defined in the osm.sqf what happens if the player clicks on mission1 in the strategic map.

That's it
2 Comments
Julian  [author] Jul 5, 2019 @ 3:20pm 
@Renegadoes
Could you describe this more?
Do you want to show the map as intro or do you want to show the player the "Open Strategic Mission Map" before the player spawns?

If you want to show the "Open Strategic Mission Map" you could write another skript.. i guess there isn't a module for that right now in Arma.. I could try to write a skript too..

If you are still working on that issue, dm me pls
Renegadoes Jun 17, 2019 @ 9:16pm 
Good guide the probe worked perfectly, maybe it does not go to the question, I'm working on a small mission please can you help me I want to make the map show before the player at the beginning of the SP mission, but the player seems to appear er before the map, I want to do this with the normal map, with what command, function or module could I do it ?.
Please help