ShaneMartin Posted August 7, 2014 Report Share Posted August 7, 2014 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 More sharing options...
Richie Posted August 7, 2014 Report Share Posted August 7, 2014 Have a look at the skalisty island release, I'm sure they have setvector up and are attached to each other. Link to comment Share on other sites More sharing options...
Nozza Posted August 7, 2014 Report Share Posted August 7, 2014 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 More sharing options...
blackwiddow Posted August 7, 2014 Report Share Posted August 7, 2014 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 More sharing options...
ShaneMartin Posted August 7, 2014 Author Report Share Posted August 7, 2014 Thanks for the reply's guy's. Will have a look later and then will get back to you. Now, would it be best running the script on the server side so players don't have to download it or client-side? Shane Link to comment Share on other sites More sharing options...
Fully Posted August 8, 2014 Report Share Posted August 8, 2014 Have a look at this?http://opendayz.net/threads/building-bridges.19536/#post-100415 Very easy to set up, you only place the first one down, work out how many you need. =) Link to comment Share on other sites More sharing options...
sinanc Posted August 8, 2014 Report Share Posted August 8, 2014 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 1 & 2 = Bridge parts Both bridges are 2,5m "Above-Sea-Level" (ASL), but different heights with "above-terrain-level" (ATL) Link to comment Share on other sites More sharing options...
2sugars Posted August 9, 2014 Report Share Posted August 9, 2014 Do as Fully says & use that way of doing it, less hassle all round. Run it server side from server_functions.sqf. Link to comment Share on other sites More sharing options...
ShaneMartin Posted August 10, 2014 Author Report Share Posted August 10, 2014 Have a look at this?http://opendayz.net/threads/building-bridges.19536/#post-100415 Very easy to set up, you only place the first one down, work out how many you need. =) Fully, can you give me instructions on how to put it into my server and create the bridge, knid of new to 3d editing. Thanks, Shane Link to comment Share on other sites More sharing options...
cring0 Posted August 12, 2014 Report Share Posted August 12, 2014 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 1 & 2 = Bridge parts Both bridges are 2,5m "Above-Sea-Level" (ASL), but different heights with "above-terrain-level" (ATL) Jesus Christ is that a image host or an arcade? insertcoins 1 Link to comment Share on other sites More sharing options...
Fully Posted August 12, 2014 Report Share Posted August 12, 2014 Fully, can you give me instructions on how to put it into my server and create the bridge, knid of new to 3d editing. Thanks, Shane Sure mate, what map uses lausen? Link to comment Share on other sites More sharing options...
King. Posted August 12, 2014 Report Share Posted August 12, 2014 Lausen is on Napf. I have a related question, so when I put down my bridge they go across the pond, but they are all parallel, not connected, anyone (Fully) no the axis that corrects that? Link to comment Share on other sites More sharing options...
Fully Posted August 13, 2014 Report Share Posted August 13, 2014 ok I will see what I can do with that bridge. @King - Land_nav_pier_m_2 has an offset of 40, if you are using something different, just play around with the values =) Link to comment Share on other sites More sharing options...
Fully Posted August 13, 2014 Report Share Posted August 13, 2014 There is a bridge there now :P 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; }; cring0 1 Link to comment Share on other sites More sharing options...
King. Posted August 13, 2014 Report Share Posted August 13, 2014 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 More sharing options...
cring0 Posted August 13, 2014 Report Share Posted August 13, 2014 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 More sharing options...
King. Posted September 16, 2014 Report Share Posted September 16, 2014 Sorry guys I forgot to get back to you... Fully, thanks so much it works so well. Yes Cring0, my bridge runs from east of Awols north to Suhrenfeld. DayZDrDoom 1 Link to comment Share on other sites More sharing options...
DayZDrDoom Posted October 17, 2014 Report Share Posted October 17, 2014 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 More sharing options...
Fully Posted October 18, 2014 Report Share Posted October 18, 2014 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 More sharing options...
DayZDrDoom Posted October 18, 2014 Report Share Posted October 18, 2014 are you building the bridge in the editor with this code? or live on the server? I guess I'm not understanding how it builds it, and his website confused the piss outta me Link to comment Share on other sites More sharing options...
DayZDrDoom Posted October 18, 2014 Report Share Posted October 18, 2014 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 More sharing options...
Fully Posted October 19, 2014 Report Share Posted October 19, 2014 Like this? 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 More sharing options...
DayZDrDoom Posted October 19, 2014 Report Share Posted October 19, 2014 yeah, that's exactly what I was trying to do.. Save and call that file? Link to comment Share on other sites More sharing options...
DayZDrDoom Posted October 19, 2014 Report Share Posted October 19, 2014 call compile preProcessFileLineNumbers "\z\addons\dayz_server\buildings\arraybridge.sqf"; <<--that si how I am calling it. Link to comment Share on other sites More sharing options...
DayZDrDoom Posted October 19, 2014 Report Share Posted October 19, 2014 Server_Monitor file -- http://pastebin.com/W1iTqKNx the code you provided -- http://pastebin.com/L3a8SFTu this is how i have it, nothing is showing on the server. i have no RPT errors Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now