ADDING LHD via MISSION.SQM
Ok all, I have a LHD spawning script that's working now - built into the mission.sqm file from your mission pbo
It works to spawn it correctly (above water, all the pieces together) but I haven't done much testing, and I don't expect that it fixed the helis falling through and blowing up on server restart.
EDIT: Excelsior bridge seems to work with vehicles on it over server restart, but I can't get the LHD to work over restart without blowing up whatever is on it. Vehicles launch into the air and come down and explode.
Save this as createlhd.sqf in the root of the pbo (ie dayz_1.chernarus/createlhd.sqf)
Code:
_LHDspawn = _this select 0;
_LHDdir = getdir _LHDspawn;
_LHDspawnpoint = getposasl _LHDspawn;
deletevehicle _LHDspawn;
_parts =
[
"Land_LHD_house_1",
"Land_LHD_house_2",
"Land_LHD_elev_R",
"Land_LHD_1",
"Land_LHD_2",
"Land_LHD_3",
"Land_LHD_4",
"Land_LHD_5",
"Land_LHD_6"
];
{
_dummy = _x createvehicle _LHDspawnpoint;
_dummy setdir _LHDdir;
_dummy setpos _LHDspawnpoint;
}foreach _parts;
Open your mission.sqm file from the pbo (ie dayz_1.chernarus/mission.sqm)
-----open in 3d editor: place any static object where you want the LHD) and place this code in the init line
Code:
this setpos [(getpos this select 0),(getpos this select 1), 0]; nul = [this] execVM "createlhd.sqf"
OR
----open in text editor: add this to your file - it goes after the end of class Markers, but before the closing bracket of the mission
this code:
Code:
class Vehicles
{
class Item0
{
side="EMPTY";
id=1;
position[]={15447.737, 0.20402038, 11146.749};
vehicle="Baseball";
azimut=0;
lock="LOCKED";
init="this setpos [(getpos this select 0),(getpos this select 1), 0]; nul = [this] execVM ""createlhd.sqf"";";
};
items=1;
};
in here: (partial file shown )
Code:
class Markers
{
items=7;
class Item0
{
position[]={7839.6055,381.33774,8414.7324};
name="center";
type="Empty";
};
class Item1
{
position[]={-18697.58,379.53012,25815.256};
name="respawn_west";
type="Empty";
};
class Item2
{
position[]={4932.3345,0.39950246,1989.1094};
name="spawn0";
type="Empty";
};
class Item3
{
position[]={2236.0391,0.63119155,1923.3735};
name="spawn1";
type="Empty";
};
class Item4
{
position[]={8738.1328,0.45720705,2122.1082};
name="spawn2";
type="Empty";
};
class Item5
{
position[]={10909.267,0.57597214,2422.3096};
name="spawn3";
type="Empty";
};
class Item6
{
position[]={13510.764,0.44504455,5249.3027};
name="spawn4";
type="Empty";
};
};
//CODE GOES HERE!!!!!! ////CODE GOES HERE!!!!!! ///////////////////
//CODE GOES HERE!!!!!! ///////CODE GOES HERE!!!!!! //////////////////////
//CODE GOES HERE!!!!!! //////////CODE GOES HERE!!!!!! /////////////////////////
};
class Intro
{
addOns[]=
{
"chernarus"
};
addOnsAuto[]=
{
"chernarus"
};
randomSeed=6913869;
class Intel
{
startWeather=0.25;
forecastWeather=0.25;
year=2008;
month=10;
day=11;
hour=9;
Save files, pack pbo, and it should work!
EDIT:
testing now - I couldn't find the vehicle I left on the carrier after restart, yet their table remains unupdated in terms of damage change. Also testing leaving vehicles on excelsior bridge, will get back to you on that.
EDIT2:
Excelsior bridge seemed to work - the car I left on it stayed on it after server restart. I'm thinking maybe it's because my LHD is a little out of bounds, going to move it closer and retest.
EDIT3:
I was close enough to see the damage this time - both cars I placed on the LHD launched 50m or so into the air, came down, and exploded. Not sure why this is happening here, but not for the bridge. LHD in general seems kind of buggy. It's late here, I'm going to bed, more testing tomorrow.
Pic:
http://steamcommunity.com/sharedfiles/filedetails/?id=139055580 LHD blowing up vehicles
(The other script posted above this I believe is the
cheat totalwar - teleports all players to LHD for deathmatch)
source:
http://www.404games.co.uk/forum/index.php?/topic/1518-add-carrier-lhd/