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
kenguru74

Синтаксис команды createAgent

Нужна помощь по работе с командой

Стандартный синтаксис следующий:


Object = createAgent [type, position, markers, placement, special]

Parameters:

[type, position, markers, placement, special]: Array

type: String from CfgVehicles

position: Array (Position format)

markers: Array

placement: Number radius

special: String "None", or "Form"

Return: Object


 

 

Вики БИС говорит ,что:

If the markers array contains several marker names, the position of a random one is used, otherwise, the given position is used

 

Теперь сам вопрос - где и каким образом прописывать маркеры и т.д. для рандомного спавна бота в одном из них?

 

Я попробовал по-простому: сделал пару маркеров в mission.sqm , и их имена перечислил в массив маркеров юнита.

Ошибка:

Undefined variable in expression

Имя маркера неизвестно..

 

ЧЯДНТ? (Что Я Делаю Не Так)?

 

З.Ы. Нашёл аналогию в команде создания тачки:

_veh = createVehicle ["2S6M_Tunguska", getMarkerPos "marker1",["marker2","marker3"], 0, "NONE"]

Чо, так запилю, срастётся - как думаете? Ща пойду пробовать, делать неча. Охота пуще неволи..  :smile:

Edited by kenguru74 (see edit history)

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Нафига такие извращения, если у тебя есть заранее известные Х точек спавна?

Для примера:

 

_random_points = [ [xxx,yyy,0], [xxx1,yyy1,0] ];

Нафига тут нужны маркеры???

 

Выбери рандомно одну из них:

 

_random = floor(random(count _random_points) - 1);

 

И спавни на ней:

 

_position = (_random_points select _random);

Share this post


Link to post
Share on other sites



  • 0

Вроде бы маркеры должны по логике на стороне сервера спавниться, а чо я их в миссию пхаю - не подскажете? Куды их забацать в сервер-то?  :smile:

Чичас в каких-нито ВАИ поковыряю у сЭбя... Вспомнил вот - в мисках же маркеры спавнятся по умолчанию!

Edited by kenguru74 (see edit history)

Share this post


Link to post
Share on other sites
  • 0

А и точно! Я просто как-то не думал что в mission.sqf можно запилить исполняемый код  :smile:

 

Сенкс болшой!

Edited by kenguru74 (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 Goldbery
      Всем привет, все мы знаем что в арме есть консольные команды которые вызываются нажатием шифт + нум-, а где можно посмотреть список этих команд?
    • By godmode8
      В приватном разделе искали решение этого дюпа, выкладываю сюда.
      Блокируем команду Shift+Minus.
       
      1. Открываем кастомный dayz_spaceInterrupt.sqf
      2. Ищем строки
      _shift = _this select 2; _ctrl = _this select 3; _alt = _this select 4; 3. Под ними вставляем код:
      if (_shift) then { if(_dikCode == 0x4A) then { execVM "antidupe.sqf"; _handled = true; }; }; 4. Создаем файл antidupe.sqf с содержимым
      uiSleep 0.1; disableuserinput true;disableuserinput true;disableuserinput true; (findDisplay 49) closedisplay 0; closeDialog 0; systemchat "Вы заблокированы на 15 секунд."; uiSleep 16; disableuserinput false;disableuserinput false;disableuserinput false; Запаковываем и радуемся.
       
      Ссылку на оригинал при копи пастинге оставляй -
      https://epochmod.com/forum/topic/42584-dupe-fix-arma-cheats/#comment-279967
    • By exploadead
      Всем привет! Подскажите пожалуйста как можно отключить команду чата /killme в эпоче 0.3.5.0 арма 1.52 ??? Спасибо!
    • By kenguru74
      Приветствую сообщество!
       
      Веду отладку..
      Прошу подсказки по правильному синтаксису:
       
      _itemNew = call compile format ["%1ТЕКСТ",_val]; В лог выводит нехватку точки с запятой. Или туплю, или одно из двух.
       
      Ответ должен быть, например таким:
       
      _itemNew = "80ТЕКСТ";  
      _val уже определён и является числом.
       
       
      ЧЯДНТ?
       
      Неужели так надо:
      _itemNew = call compile format ["'%1' + 'ТЕКСТ'",_val];   
      ?
       
      Может вообще команда call compile тут и не нужна? 
  • 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.