Spearhead 1944 Frontline Function
This page explains how to draw a frontline on the map similar to how it is done in the Operation Cobra campaign of the Spearhead 1944 CDLC.
1. Create Layer
Create a layer in Eden Editor called Frontline Control Points. This layer is referenced by the function to generate the frontline data points.
2. Start Preview
3. Create Markers
Inside the layer Frontline Control Points, create as many markers as needed to shape the frontline (The wavy black line). These markers act as control points for bezier interpolation and their position will influence the curvature. The markers will automatically be hidden at mission start.
4. Shape Frontline
Now drag the previously placed markers to shape the frontline. You can also add new markers by copy and pasting an existing one.
5. Generate Data
Once you are happy with the shape of the frontline, execute the following code again in the Arma 3: Debug Console from within Eden Editor. Instead of "preview" quality, use "high", "very high" or "ultra" instead.
6. Create Data File
Once the data was generated a window will show. Copy the content of the window and paste it into a script file. Place this script file into your mission folder. In our case we call it frontline_data.sqf and place it into the root of our test scenario.
7. Add Code
Add code that creates frontline for every client to the init.sqf. The script has local effect and thus needs to be run on every connecting client. Clients without interface are automatically excluded (headless clients, dedicated server).
Previews a frontline in Eden Editor, or depending on parameter, generates data for it so it can be created during runtime.
|Data for placing the fill markers inside frontline. If this data is provided the function assumes that the frontline should be created during mission runtime. Leave this empty for previewing in the Editor
|True to draw axis area, false to not
|Quality setting of the exported data
|CfgMarker color of the inside fill
|CfgMarker color of the outside fill
|Alpha of inside marker
|Alpha of outside marker
|Interpolation quality of the border. Lower value means it's smoother, but generates more data
As of Spearhead 1944 v1 there are some limitations:
- Only one frontline can be drawn