Welcome to Epoch Mod Community

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more!

This message will be removed once you have signed in.

  • 0
Robert261171

Help with a napf bridge.

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

Share this post


Link to post
Share on other sites

33 answers to this question

  • 0
16 hours ago, seelenapparat said:

you have 2 ,, after the direction parameter.

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

yes working now thanks, how can I adjust the height of the bridge? 

Share this post


Link to post
Share on other sites
  • 0
3 minutes ago, seelenapparat said:

third parameter in the first array.

change 0.00181246 to something higher.

0.1081246 e.g.

yes got it all working, thanks,

just sometimes I have to re-log my player for the bridge to show up. any ideas?

Share this post


Link to post
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

 

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, Robert261171 said:

just sometimes I have to re-log my player for the bridge to show up. any ideas?

check this thread, I explained the problem already.

Share this post


Link to post
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.

 

Share this post


Link to post
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.

Share this post


Link to post
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

  • Latest Donations

  • Donation Box

    Please donate to support the community.
    We appreciate all donations!
  • Advertisement
  • Supporters
  • Advertisement
  • Forum Statistics

    • Total Topics
      26453
    • Total Posts
      244128
  • Member Statistics

    • Total Members
      29485
    • Most Online
      1497

    Newest Member
    -Pathfinder-
    Joined