Jump to content

VARTA BRIDGE


LoCK0N

Recommended Posts

  • 5 months later...

How does one use the mentioned script here? I've not done much in the editor keeping things where they should be after you save the edit

 

 

Put it into your dayz_server.pbo

 

And just call it from the server_monitor under custom configs =)

 

Link to comment
Share on other sites

  • 3 weeks later...

Put it into your dayz_server.pbo

 

And just call it from the server_monitor under custom configs =)

 

Like so?

 

waitUntil{initialized}; //means all the functions are now defined

diag_log "HIVE: Starting";

waituntil{isNil "sm_done"}; // prevent server_monitor be called twice (bug during login of the first player)

// Custom Configs
if(isnil "MaxVehicleLimit") then {
	MaxVehicleLimit = 50;
};

if(isnil "MaxDynamicDebris") then {
	MaxDynamicDebris = 100;
};
if(isnil "MaxAmmoBoxes") then {
	MaxAmmoBoxes = 3;
};
if(isnil "MaxMineVeins") then {
	MaxMineVeins = 50;
};

execVM "custom\bridge.sqf";
// Custon Configs End
Link to comment
Share on other sites

Yeah...

 

I found an easy way to build a bridge. All you need to do I place the first vehicle, then use this script to attach to.

//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]


[ [13287.128, 2786.3577, -0.3], 222.15, "Land_nav_pier_m_2", 27, 40, 0, 0 ] call fnc_bridgeA2;

};

As you see down the bottom.

I created a bridge that is 1.1km long this way =)

Link to comment
Share on other sites

Hi.

 

Where is it exactly do you put this script?

 

Is it a separate one from the actual editor SQF file.

 

Also, if you are not using the pier as a bridge would you replace "Land_nav_pier_m_2" with the code of the vehicle you was using?

 

Thanks

Link to comment
Share on other sites

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


[ [13287.128, 2786.3577, -0.3], 222.15, "Land_nav_pier_m_2", 27, 40, 0, 0 ] call fnc_bridgeA2;

You can stick anywere you like, in the Server.pbo is the best place. So it spawns server side.

 

The editor sqf is only good for getting the location(startingPosition) direction and object class =)

 

the rest you build your own script.

if (isServer) then {

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]

[ [12333.089,3254.707,-2], -127.72684, "Land_Nav_Boathouse_PierT", 3, 3.5, 30.65, 0 ] call fnc_bridgeA2;

[ [11946.711,3096.6877,-2], -69.292145, "Land_Nav_Boathouse_PierT", 5, 3.5, 30.65, 0 ] call fnc_bridgeA2;

[ [11497.502,3197.7043,-2], -24.819931, "Land_Nav_Boathouse_PierT", 4, 3.5, 30.65, 0 ] call fnc_bridgeA2;

[ [13287.128, 2786.3577, -0.3], 222.15, "Land_nav_pier_m_2", 27, 40, 0, 0 ] call fnc_bridgeA2;

};

                        
diag_log("Skalisty Island loaded");
};

As you can see there are 4 bridges in the above script.

You can use as many as you want or just one.

 

Then just copy post I hope this helps.

 

You can do allsorts with this eg:build an enclosure...etc

 

Credit to Killzone Kid for his great tutorials =)

 

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

Hey. After weeks of playing with this I am still none the wiser.

 

I don't suppose someone could post a tutorial of exactly what needs putting where etc as I am at my wits end.

Thanks

 

I am assuming you can do some basic editing of files/pbo files

 

Create a folder in your dayz_server called custom (you can use any name)

 

Copy the above code and save it as skalisty_bridges.sqf - save it to the folder custom you created above.

 

Then open the init folder and open server_functions.sqf

 

Scroll down to the end of the text.

 

Insert this line

//Skalisty Bridges
call compile preProcessFileLineNumbers "\z\addons\dayz_server\custom\skalisty_bridges.sqf";

Repack & upload your dayz_server.pbo

 

You should now have bridges!  :)

 

You may find that there is only  a start and an end to your bridges. This seems to happen to the first person who joins the server only. Relogging fixes this. If anyone can explain how to fix please do!

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...