ℹ️ 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
An enemy that keeps heading towards the hero. Just one node: Chase an object.
You need:
- a 2D project open in Yop2D Next.
Step 1: the hero
- Put an object in the scene (an image or a Square) and name it heros.
- Select heros, tap ⚙ Object behavior in the Inspector and choose Top-down character.
- Tap Object → Interactive → Joystick.
Step 2: the enemy
- Put an object in the scene (an image or a Square) and name it ennemi.
Step 3: the nodes
- Open the Blueprint.
- On Start → Chase an object: Object ennemi, Object B heros, Speed 4
The nodes
On Start
→
Chase an objectennemi → heros · 4
Try it
Tap Play and move your hero: the enemy follows it.
👉 A smaller speed gives a slower enemy, easier to escape. To lose when it catches you: If object touches Tag (see the A health bar recipe).