Creating railguard for bridge

Creating railguard for bridge

« posted: Mar 17, 2021, 05:09 PM »
Hello,

i am trying to reduce mission size, I want to create for each platform create a railguard whcih will be called from script after mission starts. I placed a platforms in eden. Already having those birges created a big file.... 

Is it stupid idea or good idea?

summary what i am looking for:

Find every object (paltform) on map.
For each object spawn a 4-6 objects (barriers) which position will be relative to the object

Code: [Select]
private ["_bridge","_most","_pos","_guard1", "_guard2","_guard3"];
{
        _bridge = [];

    {

        _most = {getPos _x } forEach (nearestObjects [[9000,9000,0], ["Land_AirstripPlatform_01_F"], 999999]);

        //_pos setPos (getPos _most);

        _bridge pushBack  _most;


    //{
        //_pos = {getPos _x } forEach _bridge;
        //_pos setPos (getPos _bridge);
    };

    {
        //_guard1 = "Land_Concrete_SmallWall_8m_F" createVehicle [_boxClass, _safePos, [], 0, "NONE"];
        _guard1 = createVehicle ["Land_Concrete_SmallWall_8m_F", _bridge, [], 0, "NONE"];
        _guard2 = createVehicle ["Land_Concrete_SmallWall_8m_F", _bridge, [], 0, "NONE"];
        _guard3 =createVehicle ["Land_Concrete_SmallWall_8m_F", _bridge, [], 0, "NONE"];
        //_guard3 = "Land_Concrete_SmallWall_8m_F" createVehicle [0,0,1];

    } forEach _bridge;
};

thanks for any help

Re: Creating railguard for bridge

« Reply #1 posted: Mar 21, 2021, 02:05 PM »
solved (topic can be deleted).