← Yop2D

How to make enemies appear every 2 seconds?

Beginner guide · no code

Français · English · Español · Deutsch · Italiano · Português · Русский · 中文 · 日本語 · العربية

ℹ️ For Yop2D Next, the new 2D + 3D version of Yop2D (coming soon). Button and node names are those of Yop2D Next.

🔍 How do I…? All short recipes, with a search

A hidden model enemy and a starting point. Every 2 seconds, Yop2D makes a copy of the model at the starting point.

You need:

Step 1: the model

  1. Put an object in the scene (an image or a Square) and name it modele.
  2. Untick Visible in the game in the Inspector: it is hidden at the start.

Step 2: the starting point

  1. Put an object in the scene (an image or a Square) and name it depart.
  2. Make it small: it only marks the place. You can also untick Visible in the game.

Step 3: the nodes

  1. Open the Blueprint.
  2. On Start → Repeat: Every (seconds) 2, Number of times (0 = endless) 0 (endless).
  3. Each time output → Generate clone (Spawner) (Object depart, Object B modele)

The nodes

On Start
→
Repeat2 · 0
Each time →
Generate clone (Spawner)depart · modele

Try it

Tap Play: a new enemy appears at the starting point every 2 seconds.

👉 Copies keep the model's behaviour: give it Patrol (back and forth) or Falls and bounces in ⚙ Object behavior and each copy will move on its own.