Roblox · Захват флага · урок 3

Флаги: базы и модели

Строим две базы: подставку, флаг и зону, куда надо принести чужой флаг.

Структура

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

Workspace
└─ Bases (Folder)
   ├─ Синие (Model) — имя = имя команды
   │  ├─ Stand (Part) — подставка
   │  ├─ GivePart (Part) — сюда приносят чужой флаг
   │  └─ Flag (Model)
   │     ├─ Hitbox (Part) — Anchored вкл., прозрачный
   │     │  └─ WeldConstraint ×2 (WeldConstraint) — Hitbox ↔ Pole, Hitbox ↔ Cloth
   │     ├─ Pole (Part) — древко
   │     └─ Cloth (Part) — полотнище цвета команды
   └─ Красные (Model) — то же самое

Шаги

  1. Поле — на земле под лобби: две базы на противоположных концах, между ними укрытия.
  2. Флаг: древко «Pole» (0.4 × 8 × 0.4), полотнище «Cloth» цвета команды. Вокруг — прозрачная «Hitbox» размером с флаг (Transparency 1): за неё флаг и хватают.
  3. Hitbox — Anchored вкл.; Pole и Cloth — Anchored выкл., приварены к Hitbox (WeldConstraint в Hitbox: Part0 Hitbox, Part1 Pole; ещё один — Part1 Cloth).
  4. У всех трёх: CanCollide выкл., Massless вкл. — флаг не мешает бежать и ничего не весит.
  5. Hitbox + Pole + Cloth → модель «Flag». Под флагом — подставка «Stand».
  6. «GivePart» — плоская зона цвета команды рядом с базой: сюда игрок приносит вражеский флаг.
  7. Stand + Flag + GivePart → модель с именем команды: «Синие». Копия для красных — «Красные». Обе в папку «Bases».
  8. Точки «GameSpawn» поставь у своих баз.

Проверка

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

Roblox · Capture the flag · lesson 3

Flags: bases and models

We build two bases: a stand, a flag and a zone where the enemy flag must be brought.

Structure

Blue — what we add in this lesson.

Workspace
└─ Bases (Folder)
   ├─ Синие (Model) — name = team name
   │  ├─ Stand (Part) — the stand
   │  ├─ GivePart (Part) — the enemy flag is brought here
   │  └─ Flag (Model)
   │     ├─ Hitbox (Part) — Anchored on, transparent
   │     │  └─ WeldConstraint ×2 (WeldConstraint) — Hitbox ↔ Pole, Hitbox ↔ Cloth
   │     ├─ Pole (Part) — the pole
   │     └─ Cloth (Part) — a cloth in the team's color
   └─ Красные (Model) — the same

Steps

  1. The field is on the ground below the lobby: two bases at opposite ends with cover between them.
  2. Flag: a pole "Pole" (0.4 × 8 × 0.4) and a cloth "Cloth" in the team color. Around them a transparent "Hitbox" the size of the flag (Transparency 1): that's what players grab.
  3. Hitbox is Anchored on; Pole and Cloth are Anchored off and welded to Hitbox (a WeldConstraint in Hitbox: Part0 Hitbox, Part1 Pole; another one with Part1 Cloth).
  4. All three: CanCollide off, Massless on — the flag doesn't slow you down and weighs nothing.
  5. Hitbox + Pole + Cloth → a model "Flag". Under the flag a stand "Stand".
  6. "GivePart" is a flat zone in the team color next to the base: the player brings the enemy flag here.
  7. Stand + Flag + GivePart → a model named after the team: "Синие". A copy for red — "Красные". Both go into a folder "Bases".
  8. Place the "GameSpawn" points at their bases.

Testing

Press Play (or Run) and make sure: