How to build bridges the easy way.

kaysio

Valued Member!
Code:
////www.wtf-gaming.co.uk////
//http://killzonekid.com/arma-building-bridges/


//The script to build objects//
//Do not alter, unless you know what your doing//
// You need to have a FUNTIONS MODULE added to your mission file//


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

[ [13640.5,3862.64,-1], 105, "Land_nav_pier_m_2", 11, 40, 0, 0 ] call fnc_bridgeA2;

[ [13556,3836,2.5], 192, "Land_Nav_Boathouse_PierT", 11, 3.5, 30.65, 0 ] call fnc_bridgeA2;

[ [13057.858,3764.8315,-3.7], 70, "Land_nav_pier_m_2", 11, 40, 0, 0 ] call fnc_bridgeA2;

};




What this script does, it repeats the object.
So you select the position, direction, object class and how many times to repeat.

I seen this posted in killzone kids site.
Left his 2 bridges in and added a 3rd bridge.

It is not limited to bridges, you add any object to repeat itself.


 
What does this mean:

// You need to have a FUNTIONS MODULE added to your mission file//
 
What does this mean:

// You need to have a FUNTIONS MODULE added to your mission file//


If your using the dayz mission, its already added.
Its for when build a mission from scratch, then you need to the function module.
Just like you do, when you add game logic module.
 
Excellent script, thanks to KK for writing it and for Kaysio for showing us the script. Finally got a nice bridge on Panthera going from the watery gap between Arnoldstein and Vatra. :D Also made a stupidly long bridge for Cen on Taviana from prison island to East island 1609m long:eek:
 
Agreed, great script and thanks to Bass for making some sweet map additions for our players :D
 
Excellent script, thanks to KK for writing it and for Kaysio for showing us the script. Finally got a nice bridge on Panthera going from the watery gap between Arnoldstein and Vatra. :D Also made a stupidly long bridge for Cen on Taviana from prison island to East island 1609m long:eek:
post the code for the Panthera bridge.
Code:
////www.wtf-gaming.co.uk////
//http://killzonekid.com/arma-building-bridges/


//The script to build objects//
//Do not alter, unless you know what your doing//
// You need to have a FUNTIONS MODULE added to your mission file//


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

[ [13640.5,3862.64,-1], 105, "Land_nav_pier_m_2", 11, 40, 0, 0 ] call fnc_bridgeA2;

[ [13556,3836,2.5], 192, "Land_Nav_Boathouse_PierT", 11, 3.5, 30.65, 0 ] call fnc_bridgeA2;

[ [13057.858,3764.8315,-3.7], 70, "Land_nav_pier_m_2", 11, 40, 0, 0 ] call fnc_bridgeA2;

};




What this script does, it repeats the object.
So you select the position, direction, object class and how many times to repeat.

I seen this posted in killzone kids site.
Left his 2 bridges in and added a 3rd bridge.

It is not limited to bridges, you add any object to repeat itself.


How do you use this?
 
Back
Top