Jump to content
jakeplissken

How to spawn a composition with objectmapper and disable simulation.

Recommended Posts

This is how to disable damage and simulation when spawning a composition with the BIS_fnc_objectsMapper  function.

 

hq1 = [
	["Land_i_House_Small_01_b_pink_F",[-3.79883,-8.10938,0],0,1,0,[0,0],"smallhouse","this enablesimulation false; this allowdamage false",true,false], 
	["Land_Cargo_HQ_V2_F",[-9.65234,5.85938,0],179.046,1,0,[0,-0],"cargoHQ","this enablesimulation false; this allowdamage false",true,false], 
	["Land_i_House_Big_01_b_blue_F",[10.3301,-9.28125,0],0,1,0,[0,0],"bighouse","this enablesimulation false; this allowdamage false",true,false], 
	["Land_HBarrierBig_F",[0.306641,14.6445,0],181.375,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false], 
	["C_T_supplyCrate_F",[15.8535,-0.0214844,0],0,1,0,[0,0],"","",true,false], 
	["Land_HBarrierBig_F",[-8.19336,14.5234,0],181.375,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false], 
	["Box_T_East_Wps_F",[-17.1328,-0.998047,0],0,1,0,[0,0],"","",true,false], 
	["Land_HBarrierBig_F",[8.92969,14.748,0],181.375,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false], 
	["Land_Cargo_Patrol_V4_F",[13,11.3809,0],180,1,0,[0,0],"patrol","this enablesimulation false; this allowdamage false",true,false], 
	["B_supplyCrate_F",[-17.1035,-5.54297,0],0,1,0,[0,0],"","",true,false], 
	["Box_East_AmmoOrd_F",[-17.8086,-3.27734,0],0,1,0,[0,0],"","",true,false], 
	["Land_HBarrierBig_F",[18.4434,2.76758,0],271.054,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false], 
	["Land_HBarrierBig_F",[18.6406,-5.90234,0],270.301,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false], 
	["Land_HBarrierBig_F",[-19.3906,0.541016,0],271.204,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false], 
	["Land_HBarrierBig_F",[4.95117,-19.7207,0],0.792412,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false], 
	["Land_HBarrierBig_F",[-19.3145,-7.86328,0],271.204,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false], 
	["Land_HBarrierBig_F",[15.1641,14.6973,0],181.89,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false], 
	["Land_Cargo_Patrol_V4_F",[-14.4316,-16.3926,0],0,1,0,[0,0],"patrol1","this enablesimulation false; this allowdamage false",true,false], 
	["Land_HBarrierBig_F",[-19.416,9.06055,0],271.568,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false], 
	["Land_HBarrierBig_F",[18.3926,11.3789,0],271.956,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false], 
	["Land_HBarrierBig_F",[-16.3574,14.3965,0],181.375,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false], 
	["Box_IED_Exp_F",[-15.9961,-17.3223,0],0,1,0,[0,0],"","",true,false], 
	["Land_HBarrierBig_F",[13.4375,-19.541,0],359.697,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false], 
	["Land_HBarrierBig_F",[18.7344,-14.6699,0],271.956,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false], 
	["Land_HBarrierBig_F",[-13.5625,-19.5781,0],0.792412,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false], 
	["Land_HBarrierBig_F",[-19.0313,-16.4316,0],269.27,1,0,[0,0],"","this enablesimulation false; this allowdamage false",true,false]
];

This is what I managed to come up with, I am working on a mission with randomly spawned assets, and this works very well to create a HQ and disable simulation and damage on certain assets. Just add the init line as shown in your own composition. You can also name each object as well. This still allows a player to open doors, but not to destroy the HQ with a mortar.

  • Like 1

Share this post


Link to post
Share on other sites

As you can see in this line, I am disabling simulation and damage and also naming the building "smallhouse"

 

["Land_i_House_Small_01_b_pink_F",[-3.79883,-8.10938,0],0,1,0,[0,0],"smallhouse","this enablesimulation false; this allowdamage false",true,false],

This is a very useful tip. This way you do not need to iterate over the array afterwards to set these options.

  • 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

×