Jump to content
BlackbirdSD

Can multiple objects be grouped as 1 object?

Recommended Posts

If you made a base with lets say 5 buildings, how can you get that base to start the mission at random points all together as 1 "base" using random start position?  Can multiple items be grouped together to create 1 object?

Thanks

Share this post


Link to post
Share on other sites

Not that I know. Rather, place a building on the map. Name it building1   Set it so it will start at random places.

 

There is a command (don't have my notes handy) whereby you  place  building2 on the map  and  the building always starts, (for example) 20 meters south east of building1  In this way you can arrange for your composition to start at random places.

Share this post


Link to post
Share on other sites

I saw the composition but if I have lets say a building with a series of fences that wrap around the building, how can i make them all start in a random position?

Share this post


Link to post
Share on other sites
3 hours ago, wogz187 said:

@BlackbirdSD,
You mean like a composition?

 

Have fun!

:yeahthat:

 

2 hours ago, BlackbirdSD said:

I saw the composition but if I have lets say a building with a series of fences that wrap around the building, how can i make them all start in a random position?

Make a composition with whatever you like and it will spawn at random...(I have it working with)

[ [[Y,X,Z],
  [Y,X,Z],
  [Y,X,Z],
  [Y,X,Z],
  [Y,X,Z]] 
call BIS_fnc_selectRandom, random 360, weaponComposition ] call BIS_fnc_objectsMapper;

Have fun!

  • Like 3

Share this post


Link to post
Share on other sites
20 hours ago, zagor64bz said:

:yeahthat:

 

Make a composition with whatever you like and it will spawn at random...(I have it working with)


[ [[Y,X,Z],
  [Y,X,Z],
  [Y,X,Z],
  [Y,X,Z],
  [Y,X,Z]] 
call BIS_fnc_selectRandom, random 360, weaponComposition ] call BIS_fnc_objectsMapper;

Have fun!

so you add the y,x,z coordinates for each objects starting position?  Is "weaponComposition" the name of your composition?  How would you get this to start at my random start positions?

Share this post


Link to post
Share on other sites
1 hour ago, BlackbirdSD said:

so you add the y,x,z coordinates for each objects starting position?  Is "weaponComposition" the name of your composition?  How would you get this to start at my random start positions?

Yes mate, first you have to make a composition; once you have saved it correctly (see COMPOSITION )it's gonna look something like this:

Spoiler

weaponComposition = [
	["Land_PaperBox_open_empty_F",[-0.245605,1.09424,2.57492e-005],0,1,0,[],"","",true,false], 
	["Land_i_Shed_Ind_F",[0.226074,2.8877,0],0,1,0,[],"weaponBox","",true,false], 
	["Land_Pallet_MilBoxes_F",[2.31689,1.16992,0.000113964],210.009,1,0,[],"","",true,false], 
	["Land_Pallet_MilBoxes_F",[-0.101563,3.0249,-0.000998974],209.999,1,0,[],"","",true,false], 
	["Land_PaperBox_closed_F",[-3.18018,0.591797,6.34193e-005],150.001,1,0,[],"","",true,false], 
	["Box_NATO_WpsLaunch_F",[-2.91016,2.32324,0],60.0008,1,0,[],"","",true,false], 
	["Land_WoodenBox_F",[4.05957,-0.135254,0.000208378],180,1,0,[],"","",true,false], 
	["Box_NATO_Ammo_F",[4.49609,1.00049,7.67708e-005],164.996,1,0,[],"","",true,false], 
	["Box_NATO_AmmoOrd_F",[-4.38428,1.44482,1.7643e-005],105.005,1,0,[],"","",true,false], 
	["Land_PaperBox_closed_F",[3.99951,3.15967,0.0215073],195,1,0,[],"","",true,false], 
	["Box_NATO_WpsLaunch_F",[-4.60547,2.57861,1.28746e-005],30.0012,1,0,[],"","",true,false], 
	["Box_East_WpsLaunch_F",[5.75488,0.130859,4.05312e-005],45.0088,1,0,[],"","",true,false], 
	["Box_East_WpsLaunch_F",[5.87549,0.922363,0.0183978],30.003,1,0,[],"","",true,false], 
	["Land_PaperBox_closed_F",[5.96289,2.89014,0.0215073],150,1,0,[],"","",true,false], 
	["Box_East_AmmoOrd_F",[5.12549,4.29736,0.0215073],279.427,1,0,[],"","",true,false], 
	["Box_T_East_Ammo_F",[7.03906,1.8042,-0.000133514],210.004,1,0,[],"","",true,false], 
	["Box_East_Ammo_F",[-4.99902,5.9502,0.00257635],70.0003,1,0,[],"","",true,false], 
	["Land_Sacks_heap_F",[-3.79492,7.31299,1.66893e-005],27.138,1,0,[],"","",true,false], 
	["Land_PaperBox_open_empty_F",[8.3335,1.18213,0],0,1,0,[],"","",true,false], 
	["Land_Pallet_MilBoxes_F",[0.633301,8.54297,0.000692368],210.001,1,0,[],"","",true,false], 
	["Land_WoodenBox_F",[-1.3877,8.42334,0.0350866],60.3116,1,0,[],"","",true,false], 
	["Land_WoodenBox_F",[-2.2583,8.36621,0.0345602],250.202,1,0,[],"","",true,false], 
	["Land_Pallet_MilBoxes_F",[2.70264,8.2251,-0.00219679],100.944,1,0,[],"","",true,false], 
	["Land_PaperBox_open_full_F",[8.44629,3.35986,0],105,1,0,[],"","",true,false], 
	["Land_Shovel_F",[-3.48535,8.38965,9.82285e-005],15.4403,1,0,[],"","",true,false], 
	["Land_CratesWooden_F",[-5.96777,7.14941,3.24249e-005],180,1,0,[],"","",true,false], 
	["Land_Pallet_MilBoxes_F",[4.80664,8.21191,0.00184631],210.007,1,0,[],"","",true,false], 
	["Box_East_AmmoOrd_F",[-3.3335,8.93115,1.23978e-005],144.999,1,0,[],"","",true,false], 
	["Land_CratesWooden_F",[-5.16113,8.58691,-1.90735e-005],0,1,0,[],"","",true,false], 
	["Land_CanisterFuel_F",[-4.76074,9.48486,-0.000102997],14.9574,1,0,[],"","",true,false], 
	["Land_PaperBox_closed_F",[-7.23779,8.83496,-0.0104828],2.88202,1,0,[],"","",true,false],  
	["MetalBarrel_burning_F",[-11.9497,4.24219,0],0,1,0,[],"","",true,false], 
	["Land_PaperBox_open_full_F",[11.9795,8.59375,0],105,1,0,[],"","",true,false], 
	["Land_PaperBox_open_full_F",[13.3784,6.3833,0.0103507],242.794,1,0,[],"","",true,false], 
	["I_G_Offroad_01_armed_F",[-15.3652,0.149414,0.0653605],180.796,1,0,[],"","",true,false]
];

then you collect all the position you want the composition to spawn on; for instance, Maine ended up looking like this:


[ [[11362.9,14401.1,-0.0389652],[8327.75,14833.4,-0.0116882],[8479.59,12969.2,-0.625523],[4677.91,12731.8,0.065937],[3717.96,10416.1,0]] call BIS_fnc_selectRandom, random 360, weaponComposition ] call BIS_fnc_objectsMapper;

I put everything in the init.sqf (but you could probably put it somewhere else, like a gamelogic, but I'm not sure).

Once you start the mission, the game will choose a random position and spawn the composition. Not that difficult....just a word of advice: choose wisely the position for the spawn, especially for structures/houses and whatnot... 

 

Have fun mate.

 

  • Confused 1

Share this post


Link to post
Share on other sites
58 minutes ago, zagor64bz said:

it's gonna look something like this:

Thats not a composition, thats a objectsMapper output.

Share this post


Link to post
Share on other sites
36 minutes ago, Larrow said:

Thats not a composition, thats a objectsMapper output.

Sorry mate, I probably didn't use the correct words when I sad:

1 hour ago, zagor64bz said:

first you have to make a composition; once you have saved it correctly

By saving it correctly, I meant by using BIS_fnc_objectsGrabber and then BIS_fnc_objectsMapper to spawn the composition. Ma bad.

 

@BlackbirdSD take a look at THIS.  (By @Larrow 😋)

  • Like 1

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

×