Yop2D makes particles in two ways: the “Particle effect” node fires a burst all at once (perfect for an explosion), and the Particles object produces them non-stop (fire, smoke, rain, trail…). Other nodes add effects over the whole screen: flash, tint, vignette and fade.
You need:
- a working game, with a character named player that can move;
- enemies with the tag ennemi.
👉 To see all these effects in action, open the Effects showcase example on the Yop2D home screen: one button per effect, with the name of the node to use.
Step 1: an explosion when you touch an enemy
- Open the scene's Blueprint.
- Add the “If object touches Tag” event: target player, Tag ennemi.
- Add “Particle effect”. As the target, choose The object involved in the event: it is the enemy the player just touched. Preset: Explosion.
- Add “Destroy Object”, with the same target The object involved in the event.
- Link the three nodes in order, then start the game and touch an enemy: it explodes before disappearing.
If object touches Tagtarget: player · Tag: ennemi
→
Particle effectImplied Object · Explosion
→
Destroy ObjectImplied Object
⚠️ Order matters: “Particle effect” must come before “Destroy Object”. Once the enemy is destroyed, there is no object left to place the explosion on.
👉 You can change the color (for example
#FF40D0 for a magenta explosion) and the size (2 = twice as big). Also try Sparks, Confetti or Smoke.Step 2: a trail behind the character
- Add an object: in the Effects category, choose Particles. In the editor it shows as a dotted orange area; in the game it is invisible.
- In the inspector, PARTICLES section, tap Preset: and choose Wake trail.
- Still in the inspector, tap the Parent: None button and choose player: the object will follow the character everywhere.
- Place it just behind the character, then start the game and move: a long glowing trail follows the character.
👉 Nothing to add in the Blueprint: a Particles object works on its own as long as Active when the game starts is checked. To turn it on or off during the game, use the “Particles on / off” node.
- Fire: a torch or a campfire.
- Smoke: above a chimney.
- Rain or Snow: stretch the object across the whole top of the screen.
- Hyperspace and Speed lines: to give a feeling of great speed.
Step 3: effects over the whole screen
- “Screen flash”: a flash of color. For example red, 0.5 seconds, right after the player gets hit.
- “Screen tint”: a color over the whole game. Dark blue at 55% for night, and intensity 0 to go back to daytime.
- “Vignette”: the edges of the screen get darker, like in a movie.
- “Screen fade”: the screen goes black, then comes back.
To move to the next level smoothly (see the levels guide):
Screen fadeFade out (to the color)
→
Wait1
→
Next scene
Then, in the next level:
On Start
→
Screen fadeFade in (from the color)
👉 The tint and the vignette stay under the HUD: the score and the buttons stay easy to read. The flash and the fade cover the whole screen.
Step 4: electrocution and hit stop
- “Electrocution”: lightning crackles around an object, which flashes and shakes. Duration 0 = endless: perfect for an electric trap that warns the player.
- “Hit stop”: a very short slow-motion (0.08 seconds) at the moment of impact gives an explosion a lot of punch.
If it doesn't work
- The explosion doesn't show: check that “Particle effect” is placed before “Destroy Object”.
- The trail doesn't follow the character: check that the Particles object has player as its parent, and that Active when the game starts is checked.
- The particles have the wrong color: the color “None” keeps the preset colors; choose a real color to change them.
- The screen stays black: after a “Screen fade” Fade out (to the color), you need a “Screen fade” Fade in (from the color).