Roblox · Приключение · урок 1

Карта и диалоги

Приключение — мир с жителями, заданиями, противниками и магазином. Сегодня строим карту и учим жителей разговаривать встроенными диалогами Roblox.

Структура

Синим — что добавляем на этом уроке.

Workspace
├─ Terrain (Terrain)
└─ Elder (Model) — житель — Rig Builder
   └─ Head (MeshPart)
      └─ Dialog (Dialog) — InitialPrompt — первая фраза
         └─ DialogChoice (DialogChoice) — вариант ответа
            └─ DialogChoice (DialogChoice) — вложенный — следующий шаг разговора

Шаги

  1. Ландшафт: Home → Editor. Деревня на ровном месте, река, холмы и лес вокруг. Terrain → MaterialColors — свои цвета травы и камня; WaterColor и WaterTransparency — цвет и прозрачность воды.
  2. Житель: Avatar → Rig Builder → R15. Назови «Elder», у HumanoidRootPart Anchored вкл. — стоит на месте.
  3. В Head жителя — Dialog: InitialPrompt — что он скажет первым, Purpose — Quest/Help/Shop (значок над головой).
  4. В Dialog — DialogChoice: UserDialog — фраза игрока, ResponseDialog — ответ жителя. В DialogChoice можно класть следующие DialogChoice — получится дерево разговора.
  5. Расставь 2–3 жителей: старосту, охотника и торговца. Каждому — свои фразы.
  6. Диалоги работают без скриптов. Задания и магазин сделаем скриптами на следующих уроках.

Проверка

Запусти Play (или Run) и убедись:

Roblox · Adventure · lesson 1

Map and dialogues

An adventure is a world with villagers, quests, enemies and a shop. Today we build the map and teach the villagers to talk using Roblox's built-in dialogs.

Structure

Blue — what we add in this lesson.

Workspace
├─ Terrain (Terrain)
└─ Elder (Model) — a villager — Rig Builder
   └─ Head (MeshPart)
      └─ Dialog (Dialog) — InitialPrompt — the first line
         └─ DialogChoice (DialogChoice) — an answer option
            └─ DialogChoice (DialogChoice) — nested — the next step of the conversation

Steps

  1. Terrain: Home → Editor. A village on flat ground, a river, hills and forest around it. Terrain → MaterialColors sets your own grass and rock colors; WaterColor and WaterTransparency set the water's color and transparency.
  2. Villager: Avatar → Rig Builder → R15. Name it "Elder", HumanoidRootPart Anchored on — it stays in place.
  3. Put a Dialog in the villager's Head: InitialPrompt is what they say first, Purpose is Quest/Help/Shop (the icon above the head).
  4. Inside the Dialog put DialogChoices: UserDialog is the player's line, ResponseDialog is the villager's reply. You can put more DialogChoices inside a DialogChoice — you get a conversation tree.
  5. Place 2–3 villagers: an elder, a hunter and a trader. Each gets their own lines.
  6. Dialogs work without scripts. We'll make quests and the shop with scripts in the next lessons.

Testing

Press Play (or Run) and make sure: