Jump to content

[Help!] Trying to add bridge between Lausen and Island


Recommended Posts

Hey,

 

Trying to add a bridge between Lausen and the island that is between the airfield and Lausen.

 

Made the bridge in the 3d editor and had it all lined up and level, but when it get's onto my server the bridge is all at different levels.

 

You can go across walking and not break anything, haven't tried vehicles, but I don't want to run the risk of the players breaking bones or dying when crossing.

 

Is there anything I can do in the object init to make sure they stay in the same place on the server and avoid players getting injuries?

 

Thank you for your time,

 

Shane

Link to comment
Share on other sites

Hi Shane. 

 

I was trying to get a bridge sorted for panthera and I just could not understand the links you can find in this section under Varty bridge.

Take a look at that link, you may have more success than me.

 

However I eventually sussed it out by adding the following into my coding. (in green) The bit in red at the end is the height.

 

Any issues let me know and I will see if I can help

 

_vehicle_1 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_bridge_asf1_25", [2861.157, 7875.7563, 6.9823689], [], 0, "CAN_COLLIDE"];
  _vehicle_1 = _this;
  _this setDir -89.536591;
  _this setVehicleInit "this setVectorUp [0,0,1];";
     _this setVehicleInit "this setPosASL [getposASL this select 0, getposASL this select 1, 6.5]";
  _this setPos [2861.157, 7875.7563, 6.9823689];
};
 
_vehicle_2 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_bridge_asf1_25", [2839.2539, 7876.2378, 5.2477131], [], 0, "CAN_COLLIDE"];
  _vehicle_2 = _this;
  _this setDir -89.689972;
_this setVehicleInit "this setVectorUp [0,0,1];";
   _this setVehicleInit "this setPosASL [getposASL this select 0, getposASL this select 1, 6.5]";
  _this setPos [2839.2539, 7876.2378, 5.2477131];
};
Link to comment
Share on other sites

For the bridge pieces make them "LOCKED" in the Vehicle Lock setting and apply this to the Vehicle Init:

 

this setPosASL [getposASL this select 0, getposASL this select 1, -2.5]

 

Obviously edit the -2.5 to suit the height you want for each item.

 

Do this in the editor for each item. Once you find the correct height for the first piece, then the rest of them should all be the exact same height (if the pieces are the same type).

Link to comment
Share on other sites

For the bridge pieces make them "LOCKED" in the Vehicle Lock setting and apply this to the Vehicle Init:

 

this setPosASL [getposASL this select 0, getposASL this select 1, -2.5]

 

Obviously edit the -2.5 to suit the height you want for each item.

 

Do this in the editor for each item. Once you find the correct height for the first piece, then the rest of them should all be the exact same height (if the pieces are the same type).

 

This doesnt work well as i know because of setPosASL (set pos above sea level). Which means, sea = waves = some parts will be go higher or lower. Better is to use a script (for straight bridges) or use setPosATL (much more work on this, because find the correct height).

A Masterpiece to show you what i mean :D

unbenannt-27zuc7.jpg

1 & 2 = Bridge parts

Both bridges are 2,5m "Above-Sea-Level" (ASL), but different heights with "above-terrain-level" (ATL)

 

atlk2kqd.jpg

Link to comment
Share on other sites

This doesnt work well as i know because of setPosASL (set pos above sea level). Which means, sea = waves = some parts will be go higher or lower. Better is to use a script (for straight bridges) or use setPosATL (much more work on this, because find the correct height).

A Masterpiece to show you what i mean :D

unbenannt-27zuc7.jpg

1 & 2 = Bridge parts

Both bridges are 2,5m "Above-Sea-Level" (ASL), but different heights with "above-terrain-level" (ATL)

 

atlk2kqd.jpg

Jesus Christ is that a image host or an arcade?

Link to comment
Share on other sites

There is a bridge there now :P

YDUM8XN.jpg

 

 

LkXQQBU.jpg

 

napf_lausen_bridge.sqf

 

//START//

if (isNil "oneTime") then {

oneTime = true;


fnc_bridgeA2 = {
private ["_start","_obj"];
_start = createVehicle [
_this select 2,
_this select 0,
[],
0, "
CAN_COLLIDE"
];
_start setVectorUp [0,0,1];
_start setDir (_this select 1);
_start setPosATL (_this select 0);
for "_i" from 1 to (_this select 3) do {
_obj = createVehicle [
_this select 2,
_this select 0,
[],
0,
"CAN_COLLIDE"
];
_obj attachTo [_start, [
_i*(_this select 4),
_i*(_this select 5),
_i*(_this select 6)
]];
};
};

//END//



//Placement of objects//
//[startingPosition, direction, objectClass, repeats, offsetX, offsetY, offsetZ]


[ [12354.339, 15672.063, 0.950], -40.469933, "Land_nav_pier_m_2", 10, 40, 0, 0 ] call fnc_bridgeA2;

};

 

Link to comment
Share on other sites

Thanks Fully, so yes, I see the different bridge materials react different to the values. I got the stone bridge to work from Awols Airport to the north island, but try using the same exact coordinates with wood or concrete and it doesnt work...:)

Link to comment
Share on other sites

Thanks Fully, so yes, I see the different bridge materials react different to the values. I got the stone bridge to work from Awols Airport to the north island, but try using the same exact coordinates with wood or concrete and it doesnt work... :)

Are you talking about the Suhrenfeld Array island?  Can you run those bridges over the deep parts of the ocean like that?  That would be longer than that bridge on Taviana lol.  Or are you talking about those islands to the west?

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Thanks Fully, so yes, I see the different bridge materials react different to the values. I got the stone bridge to work from Awols Airport to the north island, but try using the same exact coordinates with wood or concrete and it doesnt work... :)

would you be willing to share that bridge? I can't get the thing fullyposted to work and the bridges keep turning and misaligning .

Link to comment
Share on other sites

would you be willing to share that bridge? I can't get the thing fullyposted to work and the bridges keep turning and misaligning .

 

That should not be happening.

Unless you are changing the 2 end values?

 

It works like this

You place down 1 part of your bridge,

In the example above, it then attaches, 10 more bridge parts to each other, with a offset "X" of 40 meters.

If you want to shar what you are doing I can have a look at for you?

Link to comment
Share on other sites

That should not be happening.

Unless you are changing the 2 end values?

 

It works like this

You place down 1 part of your bridge,

In the example above, it then attaches, 10 more bridge parts to each other, with a offset "X" of 40 meters.

If you want to shar what you are doing I can have a look at for you?

 

I'm trying to connect the N airfield on Napf to Surhfeld Array with a bridge

 

 so, I need to go into edit, create one piece of the bridge, add that to the end fo [ [12354.339, 15672.063, 0.950], -40.469933, "Land_nav_pier_m_2", 10, 40, 0, 0 ] call "Here?" ; 

then call the file?

 

 

 

 

Link to comment
Share on other sites

Like this?

 

r4Rjhte.jpg

 

 

Throw this into your dayz_server.pbo

_vehicle_2 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_grav_60_10", [15257.237, 16241.487, 1.9073486e-006], [], 0, "CAN_COLLIDE"];
  _vehicle_2 = _this;
  _this setDir -1.5076398;
  _this setPos [15257.237, 16241.487, 1.9073486e-006];
};

_vehicle_3 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_grav_6konec", [15257.377, 16235.457, -2.4795532e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_3 = _this;
  _this setDir -1.4748868;
  _this setPos [15257.377, 16235.457, -2.4795532e-005];
};

_vehicle_4 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_grav_6konec", [15246.626, 16249.506, 4.0054321e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_4 = _this;
  _this setDir 105.07574;
  _this setPos [15246.626, 16249.506, 4.0054321e-005];
};

_vehicle_5 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_grav_60_10", [15262.239, 16250.452, -6.2942505e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_5 = _this;
  _this setDir -135.0363;
  _this setPos [15262.239, 16250.452, -6.2942505e-005];
};

_vehicle_6 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_grav_0_2000", [15262.146, 16250, 0.00018882751], [], 0, "CAN_COLLIDE"];
  _vehicle_6 = _this;
  _this setDir 52.395676;
  _this setPos [15262.146, 16250, 0.00018882751];
};

_vehicle_7 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_grav_0_2000", [15275.858, 16260.578, -0.00016117096], [], 0, "CAN_COLLIDE"];
  _vehicle_7 = _this;
  _this setDir 52.451637;
  _this setPos [15275.858, 16260.578, -0.00016117096];
};

_vehicle_8 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_grav_0_2000", [15289.623, 16271.094, 0.00019550323], [], 0, "CAN_COLLIDE"];
  _vehicle_8 = _this;
  _this setDir 51.27739;
  _this setPos [15289.623, 16271.094, 0.00019550323];
};

_vehicle_9 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_grav_0_2000", [15303.176, 16281.78, 6.3419342e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_9 = _this;
  _this setDir 51.388813;
  _this setPos [15303.176, 16281.78, 6.3419342e-005];
};

_vehicle_10 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_grav_6konec", [15321.537, 16296.436, 3.7670135e-005], [], 0, "CAN_COLLIDE"];
  _vehicle_10 = _this;
  _this setDir -129.32579;
  _this setPos [15321.537, 16296.436, 3.7670135e-005];
};

//START//

if (isNil "oneTime") then {

oneTime = true;


fnc_bridgeA2 = {
private ["_start","_obj"];
_start = createVehicle [
_this select 2,
_this select 0,
[],
0, "
CAN_COLLIDE"
];
_start setVectorUp [0,0,1];
_start setDir (_this select 1);
_start setPosATL (_this select 0);
for "_i" from 1 to (_this select 3) do {
_obj = createVehicle [
_this select 2,
_this select 0,
[],
0,
"CAN_COLLIDE"
];
_obj attachTo [_start, [
_i*(_this select 4),
_i*(_this select 5),
_i*(_this select 6)
]];
};
};

//END//



//Placement of objects//
//[startingPosition, direction, objectClass, repeats, offsetX, offsetY, offsetZ]

[ [16653.469, 17273.926, -3.723206], -216.328388, "Land_nav_pier_m_2", 42, 40, 0, 0 ] call fnc_bridgeA2;

};

/* Airfield north - SA
_vehicle_8 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_nav_pier_m_2", [16653.469, 17273.926, -5.723206], [], 0, "CAN_COLLIDE"];
  _vehicle_8 = _this;
  _this setDir -36.328388;
  _this setPos [16653.469, 17273.926, -5.723206];

};

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...