automatic Aircraft Carrier

mmmyum

Valued Member!
ADDING LHD via MISSION.SQM (similar to excelsior bridge)

Vehicles on it still fall through, but all the pieces spawn nicely together and you only have to place one object! (or just copy my text)

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!

Try -8.7990531 as your height to use the middle room for tents! (thx daambi!)

BE thanks to Mathewjknott!
Code:
!"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"
to the end of both line 51 ("Land_") and line 57 ("_LHD_") in createVehicle.txt


anywhere you like!

If you add your own static object in the mission editor, it'll spawn wherever you put it!

If you add through my text in mission.sqm, the code below has the position which you can change
format {x, z, y} where z is height above sea level
position[]={x, z, y};

source: http://www.404games.co.uk/forum/index.php?/topic/1518-add-carrier-lhd/
 

Gagi2

Valued Member!
vehicles and players too fall through the deck in the front of the carrier... you can land helis and walk on the rear end and in the middle of teh carrier... but not on the front...
 

mmmyum

Valued Member!
Vehicles will not be safe on it over server restart. I'm working on finding a solution for this, but it just looks like for whatever reason vehicles load before the buildings.

@Gagi2 Which part can't you walk on? I'm pretty sure I ran across it a few times in my testing. And landed all over it.
 

Gagi2

Valued Member!
i have tested it a few times... on various methods...
in the 3d editor... i managed to run over the whole deck without falling through... but only a few times...

spawning through the db as deployable... always fell through the deck...

so i just gave up on the idea to include this carrier as our heli base ^^
 

mmmyum

Valued Member!
That sounds like Arma to me. Unreliable. I'll do some more testing and get back to you, and I'll try driving an atv across too
 

mmmyum

Valued Member!
In short, anywhere you like!

If you add your own static object in the mission editor, it'll spawn wherever you put it!

If you add through my text in mission.sqm, the code below has the position which you can change
format {x, z, y} where z is height above sea level
position[]={x, z, y};

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;
 

Mathewjknott

Well-Known Member
I tried adding this but changed it so that the createlhd.sqf was in a folder called buildings. I also changed the code in the mission file to match however i keep getting kicked before getting into the game for battleye script #50

this is whats in the scripts.log

22.04.2013 10:26:09: Mathew (IP) GUID - #127 " getdir _LHDspawn;
_LHDspawnpoint = getposasl _LHDspawn;
deletevehicle _LHDspawn;
_parts =
[
"Land_LHD_house_1",
"Land_LHD_house"
 

mmmyum

Valued Member!
I tried adding this but changed it so that the createlhd.sqf was in a folder called buildings. I also changed the code in the mission file to match however i keep getting kicked before getting into the game for battleye script #50

this is whats in the scripts.log

22.04.2013 10:26:09: Mathew (IP) GUID - #127 " getdir _LHDspawn;
_LHDspawnpoint = getposasl _LHDspawn;
deletevehicle _LHDspawn;
_parts =
[
"Land_LHD_house_1",
"Land_LHD_house"
Sorry for the late response, been out of town.

I don't use BE so I'm not sure which one you have to change, but you have to change the 5 to a 1 at the beginning of the line in scripts.txt that is getting you kicked.
 

mmmyum

Valued Member!
Those are my coords from op right?

Yeah it should be in the sea off the coast a little north of berezino

Check your RPT log to make sure there are no errors from it too, if for some reason its not spawning
 

mmmyum

Valued Member!
For vehicles to not spawn inside the LHD but on top of it, it has to spawn at the height of 15.9 iirc.
Interesting! I will have to try this, but do you mean the height of which piece? And do you happen to remember where you read that?
 
Top