17

» WarCraft 3 / Можно ли как нибудь сделать захват зданий через триггеры

Вот вы вытащили Игрока-владельца TriggeringUnit
Нужно так же но с юнитом что принадлежит врагу
Загруженные файлы
17

» WarCraft 3 / Можно ли как нибудь сделать захват зданий через триггеры

Triggering unit здесь - это само здание
и + 16.0 range слишком мало, сделайте хотябы 250, т.к. учитывается также и CollisionSize юнитов
Вытаскивайте владельца юнита, что наносит фатальный урон (когда у здания становится <500хп) и передавайте здание ему
17

» WarCraft 3 / Localized strings

В двух словах - я собрал себе юнитов в один большой файлик чтобы по мере неоходимости юзать их.
Т.к. сейчас популярны внешние сборщики, то закинул его в авто импорт сборщика и забил.
Надо было отредачить пару юнитов - создал пустую карту, импортировал файл юнитов туда, и походу в этот момент он добавил юнитов в wts.
Экспортировал назад и видимо имена с wts не подтянулись.
Попробую либо почистить все имена (всё равно всё триггерное), либо вернуть старые.
17

» WarCraft 3 / заменить бж отряд, custom script

local group G = CreateGroup()  //группа 
local unit u = null  //временный юнит
call GroupEnumUnitsInRange(G,x,y,300,null) //добавить всех юнитов в радиусе 300 от точки x/y в эту группу

// перебор группы
loop //начало цикла
	set u = FirstOfGroup(G) //берём рандомного юнита из группы
	exitwhen u==null  //если юниты закончились, прерывает цикл
	
	//наши действия
	
	call GroupRemoveUnit(G,u)// убираем юнита из группы
endloop //конец цикла
call DestroyGroup(G) //чистим за собой
set G = null //и это тоже
17

» WarCraft 3 / x y?

снова подъехали вопросы с интересными названиями xD
17

» WarCraft 3 / Где в карте хранится круглый значок Melee / Scenario ?

Карта считается милишной пока у неё есть только дефолтные триггеры, или как-то так
17

» WarCraft 3 / В 1.31 не работает классическая синхронизация?

Koladik:
Так, вот такой код работает как надо, но остается вопрос как инты в char запихивать без такого трудоемкого(долгого) преобразования типов =(
я делал алгоритм для луа, можете переписать например или сделать что-то подобное
17

» WarCraft 3 / Помогите выставить уровень способности

Так добавление способности сразу N уровня это не к РО, это уже триггерная часть
17

» WarCraft 3 / Помогите выставить уровень способности

там где-то есть строка - Пропуск уровней
либо где-то в полях абилки, либо в игровых константах
17

» WarCraft 3 / Сделать lan-only карту играбельной в режиме одного игрока.

Реверс инжиниринг
ищите какую-нибудь надпись что вылезает при попытке поиграть в 1 игрока
находите в скрипте, идёте вверх по коду
либо ищите функции RemovePlayer или CustomDefeatBJ и от них копайте
17

» Администрация XGM / Удаляются файлы ресурса

Если отправить сообщение,и не дождавшись загрузки файла то оно отправится без загруженных файлов. Только с теми что успели загрузиться.
Если дождаться пока всё загрузится и отправить снова, то аттачей там вообще не будет.
17

» WarCraft 3 / Событие - игрок нажал любую клавишу клавиатуры

BlzTriggerRegisterPlayerKeyEvent - вешает событие на триггер
BlzGetTriggerPlayerKey - возвращает нажатую кнопку с события

возможно вешать 100500 событий на один триггер не лучшая идея, но вроде бы только так
т.е. циклом развешивать все нужные кнопки на каждого игрока и всё
потом через массивы добавить определение что за кнопка была нажата
раскрыть
    constant oskeytype              OSKEY_BACKSPACE                      = ConvertOsKeyType(8)
    constant oskeytype              OSKEY_TAB                            = ConvertOsKeyType(9)
    constant oskeytype              OSKEY_CLEAR                          = ConvertOsKeyType(12)
    constant oskeytype              OSKEY_RETURN                         = ConvertOsKeyType(13)
    constant oskeytype              OSKEY_SHIFT                          = ConvertOsKeyType(16)
    constant oskeytype              OSKEY_CONTROL                        = ConvertOsKeyType(17)
    constant oskeytype              OSKEY_ALT                            = ConvertOsKeyType(18)
    constant oskeytype              OSKEY_PAUSE                          = ConvertOsKeyType(19)
    constant oskeytype              OSKEY_CAPSLOCK                       = ConvertOsKeyType(20)
    constant oskeytype              OSKEY_KANA                           = ConvertOsKeyType(21)
    constant oskeytype              OSKEY_HANGUL                         = ConvertOsKeyType(21)
    constant oskeytype              OSKEY_JUNJA                          = ConvertOsKeyType(23)
    constant oskeytype              OSKEY_FINAL                          = ConvertOsKeyType(24)
    constant oskeytype              OSKEY_HANJA                          = ConvertOsKeyType(25)
    constant oskeytype              OSKEY_KANJI                          = ConvertOsKeyType(25)
    constant oskeytype              OSKEY_ESCAPE                         = ConvertOsKeyType(27)
    constant oskeytype              OSKEY_CONVERT                        = ConvertOsKeyType(28)
    constant oskeytype              OSKEY_NONCONVERT                     = ConvertOsKeyType(29)
    constant oskeytype              OSKEY_ACCEPT                         = ConvertOsKeyType(30)
    constant oskeytype              OSKEY_MODECHANGE                     = ConvertOsKeyType(31)
    constant oskeytype              OSKEY_SPACE                          = ConvertOsKeyType(32)
    constant oskeytype              OSKEY_PAGEUP                         = ConvertOsKeyType(33)
    constant oskeytype              OSKEY_PAGEDOWN                       = ConvertOsKeyType(34)
    constant oskeytype              OSKEY_END                            = ConvertOsKeyType(35)
    constant oskeytype              OSKEY_HOME                           = ConvertOsKeyType(36)
    constant oskeytype              OSKEY_LEFT                           = ConvertOsKeyType(37)
    constant oskeytype              OSKEY_UP                             = ConvertOsKeyType(38)
    constant oskeytype              OSKEY_RIGHT                          = ConvertOsKeyType(39)
    constant oskeytype              OSKEY_DOWN                           = ConvertOsKeyType(40)
    constant oskeytype              OSKEY_SELECT                         = ConvertOsKeyType(41)
    constant oskeytype              OSKEY_PRINT                          = ConvertOsKeyType(42)
    constant oskeytype              OSKEY_EXECUTE                        = ConvertOsKeyType(43)
    constant oskeytype              OSKEY_PRINTSCREEN                    = ConvertOsKeyType(44)
    constant oskeytype              OSKEY_INSERT                         = ConvertOsKeyType(45)
    constant oskeytype              OSKEY_DELETE                         = ConvertOsKeyType(46)
    constant oskeytype              OSKEY_HELP                           = ConvertOsKeyType(47)
    constant oskeytype              OSKEY_0                              = ConvertOsKeyType(48)
    constant oskeytype              OSKEY_1                              = ConvertOsKeyType(49)
    constant oskeytype              OSKEY_2                              = ConvertOsKeyType(50)
    constant oskeytype              OSKEY_3                              = ConvertOsKeyType(51)
    constant oskeytype              OSKEY_4                              = ConvertOsKeyType(52)
    constant oskeytype              OSKEY_5                              = ConvertOsKeyType(53)
    constant oskeytype              OSKEY_6                              = ConvertOsKeyType(54)
    constant oskeytype              OSKEY_7                              = ConvertOsKeyType(55)
    constant oskeytype              OSKEY_8                              = ConvertOsKeyType(56)
    constant oskeytype              OSKEY_9                              = ConvertOsKeyType(57)
    constant oskeytype              OSKEY_A                              = ConvertOsKeyType(65)
    constant oskeytype              OSKEY_B                              = ConvertOsKeyType(66)
    constant oskeytype              OSKEY_C                              = ConvertOsKeyType(67)
    constant oskeytype              OSKEY_D                              = ConvertOsKeyType(68)
    constant oskeytype              OSKEY_E                              = ConvertOsKeyType(69)
    constant oskeytype              OSKEY_F                              = ConvertOsKeyType(70)
    constant oskeytype              OSKEY_G                              = ConvertOsKeyType(71)
    constant oskeytype              OSKEY_H                              = ConvertOsKeyType(72)
    constant oskeytype              OSKEY_I                              = ConvertOsKeyType(73)
    constant oskeytype              OSKEY_J                              = ConvertOsKeyType(74)
    constant oskeytype              OSKEY_K                              = ConvertOsKeyType(75)
    constant oskeytype              OSKEY_L                              = ConvertOsKeyType(76)
    constant oskeytype              OSKEY_M                              = ConvertOsKeyType(77)
    constant oskeytype              OSKEY_N                              = ConvertOsKeyType(78)
    constant oskeytype              OSKEY_O                              = ConvertOsKeyType(79)
    constant oskeytype              OSKEY_P                              = ConvertOsKeyType(80)
    constant oskeytype              OSKEY_Q                              = ConvertOsKeyType(81)
    constant oskeytype              OSKEY_R                              = ConvertOsKeyType(82)
    constant oskeytype              OSKEY_S                              = ConvertOsKeyType(83)
    constant oskeytype              OSKEY_T                              = ConvertOsKeyType(84)
    constant oskeytype              OSKEY_U                              = ConvertOsKeyType(85)
    constant oskeytype              OSKEY_V                              = ConvertOsKeyType(86)
    constant oskeytype              OSKEY_W                              = ConvertOsKeyType(87)
    constant oskeytype              OSKEY_X                              = ConvertOsKeyType(88)
    constant oskeytype              OSKEY_Y                              = ConvertOsKeyType(89)
    constant oskeytype              OSKEY_Z                              = ConvertOsKeyType(90)
    constant oskeytype              OSKEY_LMETA                          = ConvertOsKeyType(91)
    constant oskeytype              OSKEY_RMETA                          = ConvertOsKeyType(92)
    constant oskeytype              OSKEY_APPS                           = ConvertOsKeyType(93)
    constant oskeytype              OSKEY_SLEEP                          = ConvertOsKeyType(95)
    constant oskeytype              OSKEY_NUMPAD0                        = ConvertOsKeyType(96)
    constant oskeytype              OSKEY_NUMPAD1                        = ConvertOsKeyType(97)
    constant oskeytype              OSKEY_NUMPAD2                        = ConvertOsKeyType(98)
    constant oskeytype              OSKEY_NUMPAD3                        = ConvertOsKeyType(99)
    constant oskeytype              OSKEY_NUMPAD4                        = ConvertOsKeyType(100)
    constant oskeytype              OSKEY_NUMPAD5                        = ConvertOsKeyType(101)
    constant oskeytype              OSKEY_NUMPAD6                        = ConvertOsKeyType(102)
    constant oskeytype              OSKEY_NUMPAD7                        = ConvertOsKeyType(103)
    constant oskeytype              OSKEY_NUMPAD8                        = ConvertOsKeyType(104)
    constant oskeytype              OSKEY_NUMPAD9                        = ConvertOsKeyType(105)
    constant oskeytype              OSKEY_MULTIPLY                       = ConvertOsKeyType(106)
    constant oskeytype              OSKEY_ADD                            = ConvertOsKeyType(107)
    constant oskeytype              OSKEY_SEPARATOR                      = ConvertOsKeyType(108)
    constant oskeytype              OSKEY_SUBTRACT                       = ConvertOsKeyType(109)
    constant oskeytype              OSKEY_DECIMAL                        = ConvertOsKeyType(110)
    constant oskeytype              OSKEY_DIVIDE                         = ConvertOsKeyType(111)
    constant oskeytype              OSKEY_F1                             = ConvertOsKeyType(112)
    constant oskeytype              OSKEY_F2                             = ConvertOsKeyType(113)
    constant oskeytype              OSKEY_F3                             = ConvertOsKeyType(114)
    constant oskeytype              OSKEY_F4                             = ConvertOsKeyType(115)
    constant oskeytype              OSKEY_F5                             = ConvertOsKeyType(116)
    constant oskeytype              OSKEY_F6                             = ConvertOsKeyType(117)
    constant oskeytype              OSKEY_F7                             = ConvertOsKeyType(118)
    constant oskeytype              OSKEY_F8                             = ConvertOsKeyType(119)
    constant oskeytype              OSKEY_F9                             = ConvertOsKeyType(120)
    constant oskeytype              OSKEY_F10                            = ConvertOsKeyType(121)
    constant oskeytype              OSKEY_F11                            = ConvertOsKeyType(122)
    constant oskeytype              OSKEY_F12                            = ConvertOsKeyType(123)
    constant oskeytype              OSKEY_F13                            = ConvertOsKeyType(124)
    constant oskeytype              OSKEY_F14                            = ConvertOsKeyType(125)
    constant oskeytype              OSKEY_F15                            = ConvertOsKeyType(126)
    constant oskeytype              OSKEY_F16                            = ConvertOsKeyType(127)
    constant oskeytype              OSKEY_F17                            = ConvertOsKeyType(128)
    constant oskeytype              OSKEY_F18                            = ConvertOsKeyType(129)
    constant oskeytype              OSKEY_F19                            = ConvertOsKeyType(130)
    constant oskeytype              OSKEY_F20                            = ConvertOsKeyType(131)
    constant oskeytype              OSKEY_F21                            = ConvertOsKeyType(132)
    constant oskeytype              OSKEY_F22                            = ConvertOsKeyType(133)
    constant oskeytype              OSKEY_F23                            = ConvertOsKeyType(134)
    constant oskeytype              OSKEY_F24                            = ConvertOsKeyType(135)
    constant oskeytype              OSKEY_NUMLOCK                        = ConvertOsKeyType(144)
    constant oskeytype              OSKEY_SCROLLLOCK                     = ConvertOsKeyType(145)
    constant oskeytype              OSKEY_OEM_NEC_EQUAL                  = ConvertOsKeyType(146)
    constant oskeytype              OSKEY_OEM_FJ_JISHO                   = ConvertOsKeyType(146)
    constant oskeytype              OSKEY_OEM_FJ_MASSHOU                 = ConvertOsKeyType(147)
    constant oskeytype              OSKEY_OEM_FJ_TOUROKU                 = ConvertOsKeyType(148)
    constant oskeytype              OSKEY_OEM_FJ_LOYA                    = ConvertOsKeyType(149)
    constant oskeytype              OSKEY_OEM_FJ_ROYA                    = ConvertOsKeyType(150)
    constant oskeytype              OSKEY_LSHIFT                         = ConvertOsKeyType(160)
    constant oskeytype              OSKEY_RSHIFT                         = ConvertOsKeyType(161)
    constant oskeytype              OSKEY_LCONTROL                       = ConvertOsKeyType(162)
    constant oskeytype              OSKEY_RCONTROL                       = ConvertOsKeyType(163)
    constant oskeytype              OSKEY_LALT                           = ConvertOsKeyType(164)
    constant oskeytype              OSKEY_RALT                           = ConvertOsKeyType(165)
    constant oskeytype              OSKEY_BROWSER_BACK                   = ConvertOsKeyType(166)
    constant oskeytype              OSKEY_BROWSER_FORWARD                = ConvertOsKeyType(167)
    constant oskeytype              OSKEY_BROWSER_REFRESH                = ConvertOsKeyType(168)
    constant oskeytype              OSKEY_BROWSER_STOP                   = ConvertOsKeyType(169)
    constant oskeytype              OSKEY_BROWSER_SEARCH                 = ConvertOsKeyType(170)
    constant oskeytype              OSKEY_BROWSER_FAVORITES              = ConvertOsKeyType(171)
    constant oskeytype              OSKEY_BROWSER_HOME                   = ConvertOsKeyType(172)
    constant oskeytype              OSKEY_VOLUME_MUTE                    = ConvertOsKeyType(173)
    constant oskeytype              OSKEY_VOLUME_DOWN                    = ConvertOsKeyType(174)
    constant oskeytype              OSKEY_VOLUME_UP                      = ConvertOsKeyType(175)
    constant oskeytype              OSKEY_MEDIA_NEXT_TRACK               = ConvertOsKeyType(176)
    constant oskeytype              OSKEY_MEDIA_PREV_TRACK               = ConvertOsKeyType(177)
    constant oskeytype              OSKEY_MEDIA_STOP                     = ConvertOsKeyType(178)
    constant oskeytype              OSKEY_MEDIA_PLAY_PAUSE               = ConvertOsKeyType(179)
    constant oskeytype              OSKEY_LAUNCH_MAIL                    = ConvertOsKeyType(180)
    constant oskeytype              OSKEY_LAUNCH_MEDIA_SELECT            = ConvertOsKeyType(181)
    constant oskeytype              OSKEY_LAUNCH_APP1                    = ConvertOsKeyType(182)
    constant oskeytype              OSKEY_LAUNCH_APP2                    = ConvertOsKeyType(183)
    constant oskeytype              OSKEY_OEM_1                          = ConvertOsKeyType(186)
    constant oskeytype              OSKEY_OEM_PLUS                       = ConvertOsKeyType(187)
    constant oskeytype              OSKEY_OEM_COMMA                      = ConvertOsKeyType(188)
    constant oskeytype              OSKEY_OEM_MINUS                      = ConvertOsKeyType(189)
    constant oskeytype              OSKEY_OEM_PERIOD                     = ConvertOsKeyType(190)
    constant oskeytype              OSKEY_OEM_2                          = ConvertOsKeyType(191)
    constant oskeytype              OSKEY_OEM_3                          = ConvertOsKeyType(192)
    constant oskeytype              OSKEY_OEM_4                          = ConvertOsKeyType(219)
    constant oskeytype              OSKEY_OEM_5                          = ConvertOsKeyType(220)
    constant oskeytype              OSKEY_OEM_6                          = ConvertOsKeyType(221)
    constant oskeytype              OSKEY_OEM_7                          = ConvertOsKeyType(222)
    constant oskeytype              OSKEY_OEM_8                          = ConvertOsKeyType(223)
    constant oskeytype              OSKEY_OEM_AX                         = ConvertOsKeyType(225)
    constant oskeytype              OSKEY_OEM_102                        = ConvertOsKeyType(226)
    constant oskeytype              OSKEY_ICO_HELP                       = ConvertOsKeyType(227)
    constant oskeytype              OSKEY_ICO_00                         = ConvertOsKeyType(228)
    constant oskeytype              OSKEY_PROCESSKEY                     = ConvertOsKeyType(229)
    constant oskeytype              OSKEY_ICO_CLEAR                      = ConvertOsKeyType(230)
    constant oskeytype              OSKEY_PACKET                         = ConvertOsKeyType(231)
    constant oskeytype              OSKEY_OEM_RESET                      = ConvertOsKeyType(233)
    constant oskeytype              OSKEY_OEM_JUMP                       = ConvertOsKeyType(234)
    constant oskeytype              OSKEY_OEM_PA1                        = ConvertOsKeyType(235)
    constant oskeytype              OSKEY_OEM_PA2                        = ConvertOsKeyType(236)
    constant oskeytype              OSKEY_OEM_PA3                        = ConvertOsKeyType(237)
    constant oskeytype              OSKEY_OEM_WSCTRL                     = ConvertOsKeyType(238)
    constant oskeytype              OSKEY_OEM_CUSEL                      = ConvertOsKeyType(239)
    constant oskeytype              OSKEY_OEM_ATTN                       = ConvertOsKeyType(240)
    constant oskeytype              OSKEY_OEM_FINISH                     = ConvertOsKeyType(241)
    constant oskeytype              OSKEY_OEM_COPY                       = ConvertOsKeyType(242)
    constant oskeytype              OSKEY_OEM_AUTO                       = ConvertOsKeyType(243)
    constant oskeytype              OSKEY_OEM_ENLW                       = ConvertOsKeyType(244)
    constant oskeytype              OSKEY_OEM_BACKTAB                    = ConvertOsKeyType(245)
    constant oskeytype              OSKEY_ATTN                           = ConvertOsKeyType(246)
    constant oskeytype              OSKEY_CRSEL                          = ConvertOsKeyType(247)
    constant oskeytype              OSKEY_EXSEL                          = ConvertOsKeyType(248)
    constant oskeytype              OSKEY_EREOF                          = ConvertOsKeyType(249)
    constant oskeytype              OSKEY_PLAY                           = ConvertOsKeyType(250)
    constant oskeytype              OSKEY_ZOOM                           = ConvertOsKeyType(251)
    constant oskeytype              OSKEY_NONAME                         = ConvertOsKeyType(252)
    constant oskeytype              OSKEY_PA1                            = ConvertOsKeyType(253)
    constant oskeytype              OSKEY_OEM_CLEAR                      = ConvertOsKeyType(254)
17

» WarCraft 3 / двумерный массив lua

pro100master, метатаблицы это сложновато, я сам до конца ещё не понял где и правильно их можно использовать
а тут по факту - нужно - создали - заполнили, пара лишних пустых таблиц в любом случае вреда не принесёт
17

» WarCraft 3 / Preload

Сталкивался с такой ошибкой на 1.31, что он не может создать файлы, если имя пользователя на кириллице
17

» WarCraft 3 / двумерный массив lua

создаём основную таблицу:
table = {}
создаём в ней ещё таблицы, чтобы можно было к ним обращаться
for i = 0, 10 do
table[i] = {}
end
т.е. сейчас можно обратиться к table[0][0] и не получить ошибку
если нужна ещё большая глубина таблицы, создаёте ещё:
table[0][0] = {}
table[0][0][1] = "Good"
а вообще вот тут можно потестить всё прежде чем приступать к переносу в варик
17

» WarCraft 3 / Reforged на LUA

if GetUnitTypeId(u) == FourCC('O485') then
Ко всем равкодам нужно теперь добавлять FourCC('XXXX') чтобы из строки сделать обычное представление в виде integer
Ещё неравенство из != превращается в ~=
С регионами вроде бы всё по старому
17

» WarCraft 3 / Проблема с игрой на 1.31: не скачивается карта - причины?

Скачивается/ не открывается / ???
Если конкретно не скачивается как на скрине - у 1.31 есть некоторые проблемы с этим.
В моём случае - карты были разные (читка с именем офф версы), но она не перекачивалась по какой-то причине.
В итоге пока не удалил эту мапу и не перекачал её с хоста - проблема не решилась.
Загруженные файлы