• Новые темы в этом разделе публикуются автоматически при добавлении файла в менеджер ресурсов.
    Ручное создание новых тем невозможно.
Иконка ресурса

Multiboards (Меню паузы)

Красная Королева

Путник
Модератор
Сообщения
461
Розыгрыши
0
Репутация
141
Реакции
28
Баллы
0
Multiboards (Меню паузы)
Оригинал by bob27 перевод by C@$p3®

Вступление:
Мультиборды можно использовать для самых различных функций. В большинстве случаев их используют для отображения информации об игре (например, количество убийств). Разница между мультибором и лидербором (Меню паузы и Таблица рекордов) в том что мультиборд имеет несколько столбцов и вы можете использовать их так же как и в Excel’е.
Колонки и строки:
В мултибордах используются Колонки и строки, Строки размещаются по оси Х, колонки по оси Y.

Код:
Код:
События Time - Elapsed game time is 0.00 seconds Условия Действия Multiboard - Create a multiboard with 4 columns and 2 rows, titled Kills
В каждом триггере после создания нового мультиборда, система запросит вас ввести количество колонок и рядов.
Создание мультиборда не может быть вызвано таким событием:

Код:
Код:
Map initialization
Так что вам нужно использовать следующее
Код:
Код:
Time - Elapsed game time is 0.00 seconds
Вот пример на котором можно увидеть как располагаются строки и столбцы на мультиборде. Буквой “R” отмечены строки, буквой “C” отмечены столбцы.
То есть, если следовать этой картинке то ячейка C1; R1 будет находится в самом верхнем левом углу, а ячейка C4; R2 в самом нижнем правом углу мультиборда.
Расцветка, пробелы, заполнение иконки и текст ячеек.

Использую этот (см. выше) график, мы можем сделать такой триггер:

Код:
Код:
События Time - Elapsed game time is 0.00 seconds Условия Действия Multiboard - Set the icon for TutorialBoard item in column 2, row 2 to ReplaceableTextures\CommandButtons\BTNPillage.blp
В котором мы создаем Иконку во второй строке, втором столбце, которая в нашей демо-карте занимает два бокса в самом низу мультиборда

Код:
Код:
События Time - Elapsed game time is 0.00 seconds Условия Действия Multiboard - Set the text for TutorialBoard item in column 1, row 1 to Text
Этот триггер заставляет текст появится в первой колонке в первом ряду

Код:
Код:
События Time - Elapsed game time is 0.00 seconds Условия Действия Multiboard - Set the width for (Last created multiboard) item in column 1, row 1 to 3.00% of the total screen width
Когда вы используете текст в выбранном вами пространстве, оно может быть недостаточно большим чтобы отображать его полностью. В вышепоказанном триггере мы увеличиваем ширину нашего мультиборда для подгонки его под текст и возможности прочесть текст.

Код:
Код:
Events Time - Elapsed game time is 0.00 seconds Conditions Actions Multiboard - Set the color for TutorialBoard item in column 1, row 1 to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Этот триггер изменил цвет нашего текста. 100.00% для каждого поля цвета сделает ваш текст белым, в свою очередь 0.00% даст вам черный цвет.
Отображение мультиборда

Код:
Код:
Multiboard - Show TutorialBoard
Это действие – отображает наше меню паузы.
Использование меню паузы
Сейчас мы узнаем как установить мультиборд, зная как его сделать. Этот мультиборд будет показывать количество убийств у каждого игрока и героя.

Код:
Код:
События Time - Elapsed game time is 0.00 seconds Условия Действия Multiboard - Create a multiboard with 4 columns and 2 rows, titled Kills Set TutorialBoard = (Last created multiboard) Multiboard - Change the color of the title for TutorialBoard to (100.00%, 80.00%, 20.00%) with 0.00% transparency Multiboard - Set the icon for TutorialBoard item in column 1, row 1 to ReplaceableTextures\CommandButtons\BTNFootman.blp Multiboard - Set the icon for TutorialBoard item in column 1, row 2 to ReplaceableTextures\CommandButtons\BTNGrunt.blp Multiboard - Set the icon for TutorialBoard item in column 2, row 1 to ReplaceableTextures\CommandButtons\BTNPillage.blp Multiboard - Set the icon for TutorialBoard item in column 2, row 2 to ReplaceableTextures\CommandButtons\BTNPillage.blp Multiboard - Set the width for TutorialBoard item in column 1, row 1 to 6.00% of the total screen width Multiboard - Set the width for TutorialBoard item in column 1, row 2 to 6.00% of the total screen width Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Humans Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to Orcs Multiboard - Set the color for TutorialBoard item in column 1, row 1 to (30.00%, 30.00%, 20.00%) with 0.00% transparency Multiboard - Set the color for TutorialBoard item in column 1, row 2 to (100.00%, 30.00%, 30.00%) with 0.00% transparency Multiboard - Set the text for TutorialBoard item in column 2, row 1 to (String(HumanKills)) Multiboard - Set the text for TutorialBoard item in column 2, row 2 to (String(OrcKills)) Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Human Hero Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to Orc Hero Multiboard - Set the color for TutorialBoard item in column 3, row 1 to (30.00%, 100.00%, 30.00%) with 0.00% transparency Multiboard - Set the color for TutorialBoard item in column 3, row 2 to (100.00%, 100.00%, 30.00%) with 0.00% transparency Multiboard - Set the width for TutorialBoard item in column 3, row 1 to 8.00% of the total screen width Multiboard - Set the width for TutorialBoard item in column 3, row 2 to 8.00% of the total screen width Multiboard - Set the icon for TutorialBoard item in column 3, row 1 to ReplaceableTextures\CommandButtons\BTNArthas.blp Multiboard - Set the icon for TutorialBoard item in column 3, row 2 to ReplaceableTextures\CommandButtons\BTNThrall.blp Multiboard - Set the icon for TutorialBoard item in column 4, row 1 to ReplaceableTextures\CommandButtons\BTNPillage.blp Multiboard - Set the icon for TutorialBoard item in column 4, row 2 to ReplaceableTextures\CommandButtons\BTNPillage.blp Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to (String(Human_Hero_Kills)) Multiboard - Set the text for (Last created multiboard) item in column 4, row 2 to (String(Orc_Hero_Kills)) Multiboard - Show TutorialBoard
Этот триггер установил наш мультиборд, и мы установили отображение переменных “kills” в нужных нам местах.

Код:
Код:
События Unit - A unit Dies Условия Действия If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Owner of (Triggering unit)) Equal to Player 1 (Red) Then - Actions Set OrcKills = (OrcKills + 1.00) Multiboard - Set the text for TutorialBoard item in column 2, row 2 to (String(OrcKills)) Else - Actions Do nothing If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Owner of (Triggering unit)) Equal to Player 2 (Blue) Then - Actions Set HumanKills = (HumanKills + 1.00) Multiboard - Set the text for TutorialBoard item in column 2, row 1 to (String(HumanKills)) Else - Actions Do nothing
Этот триггер используется для добавления убийств в катеорию «Убиства игрока» (Player Kills)

Код:
Код:
События Unit - A unit Dies Условия Действия If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Killing unit) Equal to Human_Hero Then - Actions Set Human_Hero_Kills = (Human_Hero_Kills + 1.00) Multiboard - Set the text for TutorialBoard item in column 4, row 1 to (String(Human_Hero_Kills)) Else - Actions Do nothing If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Killing unit) Equal to Orc_Hero Then - Actions Set Orc_Hero_Kills = (Orc_Hero_Kills + 1.00) Multiboard - Set the text for TutorialBoard item in column 4, row 2 to (String(Orc_Hero_Kills)) Else - Actions Do nothing
Этот триггер показывает практически тоже самое, только он соханяет не количество убитых юнитов, а количество убитых героев.
Заключение
Если у вас есть какие-то вопросы можете присылать их мне на почту bob27dav@optusnet.com.au - автор (casper_map@mail.ru – переводчик).
 

Назад
Сверху Снизу