I've modified the original DynO scripts from ArmA2 for use in ArmA3. Credit goes to their original creator Joris-Jan van 't Land. Original A2/OA compositions not included.
I'm not sure if this exists already somewhere, I'm aware scripts like MCC Sandbox can export compositions, but I wanted something simple and only for this purpose.
Download example mission and script set:
Setup: Copy the dyno_a3 folder into your mission directory.
Create the composition script: Go to \dyno_a3\doc\ directory and copy the _emptyTemplate.sqf and rename the copy to the desired name of your composition, for example myComposition.sqf. The template looks like this:Create a composition: Place the desired objects in editor. Once you want to copy them into a composition, use the following command:Code:
paste your copied array from Grabber over this line
0 = [position,radius] execvm "dyno_a3\otl7_Grabber.sqf" where position is the center of the composition and radius is the radius in which objects are included in the composition.
The composition will be copied to your clipboard. Paste it into your composition script over the "paste over this line" line. Remove the comma at the end of the array. Example:Spawn your composition: UseCode:
_newComp = [position, direction, "filepath\yourCompositionScript.sqf", boolean] call (compile (preprocessFileLineNumbers "dyno_a3\otl7_Mapper.sqf")); in init.sqf or init field to spawn a composition at start or use
_newComp = [position, direction, "filepath\yourCompositionScript.sqf", boolean] execVM "dyno_a3\otl7_Mapper.sqf"; to spawn the composition after mission start.
Position is the position where the composition will be spawned with the composition centered there.
Direction is the direction that composition will face.
"filepath\yourCompositionScript.sqf" is the file path and name of your composition script (recommended filepath is dyno_a3\doc\).
boolean can be true or false. If true, each object's up vector will be set to 0-0-1, levelling the object. Can be useful on sloped terrain.