Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0
Lexa008

Вопрос по WAI

Уважаемые люди! Не могли бы вы мне подсказать возможно ли в WAi сделать миссию, чтоб она не рандомно спавнилась, а в заданных мной координатах. Как это можно реализовать? 

Как я понимаю за спавн отвечает вот эта строчка 

_position		= [40] call find_position;

Как ее правильно изменить?

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

 

if(isServer) then {

    private ["_complete","_crate","_mission","_static_gun","_crate_type","_rndnum","_playerPresent","_vehname","_vehicle","_position","_vehclass"];

    // Get mission number, important we do this early
    _mission         = count wai_mission_data -1;
    
    //Armed Land Vehicle
    _vehclass         = armed_vehicle call BIS_fnc_selectRandom;
    _vehname         = getText (configFile >> "CfgVehicles" >> _vehclass >> "displayName");

    _pos_location = [
        ["Романов",[11739,9028,0]],
        ["Дубово",[16359,11582.5,0]],
        ["Комарово",[10567.5,6580.06,0]]
    ];
    _location         = _pos_location call BIS_fnc_selectRandom;
    _position        = (_location select 1);

    [_mission,_position,"Medium",format["Patrol %1",_vehname],"MainHero",false,false] call mission_init;
    
    diag_log format["WAI: [Mission:[Hero] Patrol]: Starting... %1",_position];

    //Spawn units
    _units = [[_position select 0,_position select 1,.1],3,"Hard","Random",3,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

    //Spawn vehicles
    _vehicle = [_vehclass,_position,_mission] call custom_publish;
    [[(_position select 0) + 50,(_position select 1),0],[50,50,0],800,"UH60M_EP1_DZE",6,"Random","Random",4,"Random","Bandit","Random","Bandit",false,_mission] spawn heli_para;
    
    // load the guns
    //[_vehicle,_vehclass] spawn load_ammo;

    //Setup patrol
    [_vehicle,_position,_units,_pos_location,3] call patrol;
    
    if(debug_mode) then {
        diag_log format["WAI: [Hero] patrol spawned a %1",_vehname];
    };
    
    //Condition
    _complete = [
        [_mission,_vehicle], // mission number and crate
        ["kill"],          // ["crate"], or ["kill"], or ["assassinate", _unitGroup],
        [_vehicle],          // cleanup objects
        format["Bandits have started to patrol in %1",(_location select 0)],    // mission announcement
        "Heroes have taken out the bandit patrol!",        // mission success
        "Bandits managed to reach their destination"        // mission fail
    ] call mission_winorfail;

    if(_complete) then {
        [_vehicle,8,2,8,2] call dynamic_crate;
    };

    diag_log format["WAI: [Mission:[Hero] Armed Vehicle]: Ended at %1",_position];
    
    h_missionsrunning = h_missionsrunning - 1;
};

Блин точно))) СПС!

Share this post


Link to post
Share on other sites



  • 0


if(isServer) then {

 

    private ["_complete","_crate","_mission","_static_gun","_crate_type","_rndnum","_playerPresent","_vehname","_vehicle","_position","_vehclass"];

 

    // Get mission number, important we do this early

    _mission         = count wai_mission_data -1;

    

    //Armed Land Vehicle

    _vehclass         = armed_vehicle call BIS_fnc_selectRandom;

    _vehname         = getText (configFile >> "CfgVehicles" >> _vehclass >> "displayName");

 

    _pos_location = [

        ["Романов",[11739,9028,0]],

        ["Дубово",[16359,11582.5,0]],

        ["Комарово",[10567.5,6580.06,0]]

    ];

    _location         = _pos_location call BIS_fnc_selectRandom;

    _position        = (_location select 1);

 

    [_mission,_position,"Medium",format["Patrol %1",_vehname],"MainHero",false,false] call mission_init;

    

    diag_log format["WAI: [Mission:[Hero] Patrol]: Starting... %1",_position];

 

    //Spawn units

    _units = [[_position select 0,_position select 1,.1],3,"Hard","Random",3,"Random","Bandit","Random","Bandit",_mission] call spawn_group;

 

    //Spawn vehicles

    _vehicle = [_vehclass,_position,_mission] call custom_publish;

    [[(_position select 0) + 50,(_position select 1),0],[50,50,0],800,"UH60M_EP1_DZE",6,"Random","Random",4,"Random","Bandit","Random","Bandit",false,_mission] spawn heli_para;

    

    // load the guns

    //[_vehicle,_vehclass] spawn load_ammo;

 

    //Setup patrol

    [_vehicle,_position,_units,_pos_location,3] call patrol;

    

    if(debug_mode) then {

        diag_log format["WAI: [Hero] patrol spawned a %1",_vehname];

    };

    

    //Condition

    _complete = [

        [_mission,_vehicle], // mission number and crate

        ["kill"],          // ["crate"], or ["kill"], or ["assassinate", _unitGroup],

        [_vehicle],          // cleanup objects

        format["Bandits have started to patrol in %1",(_location select 0)],    // mission announcement

        "Heroes have taken out the bandit patrol!",        // mission success

        "Bandits managed to reach their destination"        // mission fail

    ] call mission_winorfail;

 

    if(_complete) then {

        [_vehicle,8,2,8,2] call dynamic_crate;

    };

 

    diag_log format["WAI: [Mission:[Hero] Armed Vehicle]: Ended at %1",_position];

    

    h_missionsrunning = h_missionsrunning - 1;

};

 

Edited by shturman (see edit history)

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

  • Similar Content

    • By Akie
      Никак не могу разобраться как заставить ВАИ выводить миникарту при старте миссии, скрипт есть, просто как заставить его выводить её не могу понять, подскажите пожалуйста господа. Знаю что сообщения выводятся через mission_winorfail.sqf, но как оттуда сделать вызов вариабла сообщения я не знаю.
    • By Gromillla
      Доброго времени суток дамы и господа, и сразу к вопросу, в миссиях 2.2.5 версии, если боты "бандиты", то они скин игрока видят и реагируют на него, а если миссии с ботами "героями", то они скин игрока не видят. Скин  "RUS_Soldier_Marksman". Как соответственно решить эту проблему? Ошибок в РПТ нет.
    • By Akie
      Каким софтом можно расковырять модели из АРМЫ, подскажите пожалуйста?+
    • By BorizzK
      В чем отличие
       
      MyPlayerBase: PlayerBase
       
      и
       
      MyPlayerBase extends PlayerBase
       
      или это одно и то же?
    • By Шапокляк
      Как сделать чтоб Боты агрелись на Игрока с расстояния   1000-1500 метров. Темы вродибы есть но решений нет.
      ai_share_info = true; // AI share info on player position ai_share_distance = 2000; // distance from killed AI for AI to share your rough position ai_skill_extreme = [["aimingAccuracy",1.00],["aimingShake",1.00],["aimingSpeed",1.00],["endurance",1.00],["spotDistance",3.99],["spotTime",1.00],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00]]; // Extreme ai_skill_hard = [["aimingAccuracy",1.00],["aimingShake",1.00],["aimingSpeed",1.00],["endurance",1.00],["spotDistance",3.99],["spotTime",1.00],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00]]; // Hard менял все не помогает.!!!
  • Our picks

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.