Jump to content
  • 0

Help with a napf bridge.


Robert261171

Question

Can anyone help me with building a bridge on a napf map,

I've been playing with the 3d editor with no luck.

I want the bridge to go from the airport to suhrenfeld array island.

The reason is I have made a Ai island and want to make it easier for players to get there.

Hope you can help.. 

Link to comment
Share on other sites

Recommended Posts

  • 0

y, I remember now, that there was a problem with it showing up sometimes.

what helps is this:

1. easy way: just relog and it should show.

2. better way: do the same with the bridge on the client side. what I mean is this:

execute the same function from init. sqf (if (!isDedicated) then { part) and let the bridge spawn clientside too.

so its executed from the server and the client. this fixes the issue of the bridge not showing up for the first player to join.

Link to comment
Share on other sites

  • 0
7 hours ago, Robert261171 said:

Ive tried this one and nothing shows up.

I get this error,

17:20:53 Error in expression <
[[15259.6,16511.8,0.00181246], 54.0763,,"MAP_bridge_asf1_25",39,40,0,0] call fn>
17:20:53   Error position: <,"MAP_bridge_asf1_25",39,40,0,0] call fn>
17:20:53   Error Invalid number in expression
17:20:53 File z\addons\dayz_server\buildings\bridge.sqf, line 19
17:20:53 Error in expression <select 5),_i*(_this select 6)]];

Link to comment
Share on other sites

  • 0

Yes got this all working now, Thank you all for your help.

Spoiler

 

 

Called it in the init.SQF

if (isServer) then {
    if (dayz_POIs && (toLower worldName == "chernarus")) then {call compile preprocessFileLineNumbers "\z\addons\dayz_code\system\mission\chernarus\poi\init.sqf";};
    call compile preprocessFileLineNumbers "\z\addons\dayz_server\system\dynamic_vehicle.sqf";
    call compile preprocessFileLineNumbers "\z\addons\dayz_server\system\server_monitor.sqf";
    //Extra Buildings
    execVM "\z\addons\dayz_server\traders\napf.sqf";         //Add trader agents
    execVM "\z\addons\dayz_server\bankTraders\napf.sqf";     //Add banking agents
    execVM "\z\addons\dayz_server\buildings\Hero.sqf";
    execVM "\z\addons\dayz_server\buildings\insel.sqf";
    execVM "\z\addons\dayz_server\buildings\Bridge.sqf";

And the script is,

/*
    By: j0k3r5 / www.j0k3r5.com
    If modified and released give credits where due, thank you.
    
*/

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)]];
        };
};

[[16661.828, 17280.934, -5.7427592], 148,"Land_nav_pier_m_2",41,40,0,0] call fnc_bridgeA2;

 

All done

 

Link to comment
Share on other sites

  • 0
On 21.7.2017 at 3:33 PM, seelenapparat said:

y, I remember now, that there was a problem with it showing up sometimes.

what helps is this:

1. easy way: just relog and it should show.

2. better way: do the same with the bridge on the client side. what I mean is this:

execute the same function from init. sqf (if (!isDedicated) then { part) and let the bridge spawn clientside too.

so its executed from the server and the client. this fixes the issue of the bridge not showing up for the first player to join.

Correct me if I´m wrong ,,,,,,, but ...... when you call this directly from the init.sqf and not from the dayz_server.pbo you need only once of them, or?

What I mean is create a new folder in the mpmission like "bridge" and name the script bridge.sqf ....... then call it from the init.sqf with

[] execVM "\bridge\bridge.sqf";

there is no need for it in the dayz_server.pbo.

And both, the server and the client side hase it.

 

Link to comment
Share on other sites

  • 0
On 7/21/2017 at 0:51 PM, Robert261171 said:

I get this error,

17:20:53 Error in expression <
[[15259.6,16511.8,0.00181246], 54.0763,,"MAP_bridge_asf1_25",39,40,0,0] call fn>
17:20:53   Error position: <,"MAP_bridge_asf1_25",39,40,0,0] call fn>
17:20:53   Error Invalid number in expression
17:20:53 File z\addons\dayz_server\buildings\bridge.sqf, line 19
17:20:53 Error in expression <select 5),_i*(_this select 6)]];

Thats my fault for the ,, before "MAP_bridge_asf1_25" in the original post i made, remove one of the , and ill correct my post now.

Link to comment
Share on other sites

  • 0
21 hours ago, Anhor said:

Correct me if I´m wrong ,,,,,,, but ...... when you call this directly from the init.sqf and not from the dayz_server.pbo you need only once of them, or?

What I mean is create a new folder in the mpmission like "bridge" and name the script bridge.sqf ....... then call it from the init.sqf with


[] execVM "\bridge\bridge.sqf";

there is no need for it in the dayz_server.pbo.

And both, the server and the client side hase it.

 

yes thats what I have done, put it all in the mission.pbo instead of the server.pbo and works fine now

Link to comment
Share on other sites

  • 0
54 minutes ago, DAKA said:

I am unable to get it to work. you are lucky then. I have tried everything to get it to work.

Holy sh**! Copy this and call it bridge.sqf:

Spoiler

/*
	By: j0k3r5 / www.j0k3r5.com
	If modified and released give credits where due, thank you.
	
*/

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)]];
        };
};

[[15259.6,16511.8,0.00181246], 54.0763,,"Land_nav_pier_m_2",39,40,0,0] call fnc_bridgeA2;

Create a folder called "bridge" in your mpmission folder and save it there!

After that at the bottom of your init.sqf (mpmission) paste this:

Spoiler

[] execVM "bridge\bridge.sqf";

 

Thats it! Works perfect!

Link to comment
Share on other sites

  • 0
On 7/19/2017 at 8:31 PM, kingpapawawa said:

This bridge starts behind AWOLS and goes to the island. 1400+m away (well it should) 

My bridge is south of that, with no bumps or gaps. Thanks for the information.  I am going to try this. If it works, you will have proven that I wasted way to many hours in editor lol

Link to comment
Share on other sites

  • 0
4 minutes ago, Thug said:

My bridge is south of that, with no bumps or gaps. Thanks for the information.  I am going to try this. If it works, you will have proven that I wasted way to many hours in editor lol

The problem is the direction ....... 0° should lead it north, 90° east, 180° south and 270° west (seen from the start coordinate)

@DAKA the one I post bevor.

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...