Jump to content
thecoolsideofthepillow

Working Method of Spawning a Custom Composition via Script?

Recommended Posts

The method I used to use no longer works, and the other two methods I have found on Google looking for a solution have also failed to work (probably for the same reason as the primary one listed on the wiki that does not work in A3). Is there really no way to do this anymore?

Share this post


Link to post
Share on other sites

1. Build your composition in Eden.
2. Aim the eden camera on the center of your composition.

3. Open debug console and run ObjectsGrabber something like so: t = [ screenToWorld [0.5,0.5], 50, true] call BIS_fnc_objectsGrabber

4. Paste (Ctrl+V) the contents into whichever file you wish to save them in (in the mission folder). How you save it exactly is up to you but the simplest way would be a global variable in your init.sqf: testComposition = *the pasted content here*;

5. When you wish to spawn the composition simply call ObjectsMapper with the relevant content like so: [ testPosition, random 360, testComposition ] call BIS_fnc_objectsMapper;

 

For more info on the functions see:

BIS_fnc_ObjectsGrabber

BIS_fnc_ObjectsMapper

 

Until BIS figures out a decent way to package compositions with missions I'd say the above is your best bet.

  • Like 3
  • Thanks 2

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

×