ℹ️ 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
Some nodes look alike. Here is what each one is for, so you pick the right one the first time.
Change scene, Go to scene (by name) or Next scene?
- Go to scene: you pick the scene in a list. The simplest, for a “Play” or “Menu” button.
- Go to scene (by name): you type the scene's name, or a formula that gives that name (for example a name kept in a variable).
- Next scene and Previous scene: the scene just after (or just before) in the list of scenes. Handy to chain levels: put them in order.
- Go to scene with a transition: like Go to scene, with an effect (circle, star, curtain…).
- These nodes end the chain: what must happen next is set in On Start of the new scene.
Collision A/B, If object touches Tag or Zone exit?
- Collision A/B: two specific objects. Fires once, when A starts touching B. It is also the event for “entering a zone”.
- If object touches Tag: one object against a whole family of objects (all the coins, all the enemies). The touched object becomes The involved object (the touched object): the next node can act on it alone (destroy it, for example). A setting limits the contact to one side (top, bottom, left, right).
- Exit Zone: the opposite: fires when A stops touching B.
- The most used: If object touches Tag, for coins, enemies, spikes.
On Object Click, Object Click End, Held on Object or Finger down?
- On Object Click: as soon as the finger touches the object. For a button.
- Object Released: when the finger is lifted over the object.
- Object Held Down: repeats every frame as long as the finger stays on the object. For a button you hold down (speed up, run).
- Finger held down and End of Click: the same, but anywhere on the screen.
- Only the frontmost object under the finger gets the touch: see My game doesn't work.
Small message, alert window, Show a dialogue or Say a line?
- Small message at the bottom of the screen: a few seconds at the bottom of the screen (“+1 life”). Nothing to tap.
- Show an alert window: a window with a title, a message and a button. The game can pause; what follows starts when the player taps the button.
- Show dialogue: writes a line from the game's texts into a Text object, in the player's language.
- Say a line: for stories. The character speaks in a dialogue box, letter by letter, with their emotion; the player taps the screen to go on.
On Start, Every frame or On every new scene?
- On Start: once, when the scene starts (and again after Restart the scene). For example: score to 0, music, placing the enemies.
- Every frame: non-stop, about 60 times per second. For example: a text that follows the finger, checking if
vies <= 0. Never put a sound, a music or object creation in it. - On every new scene: each time a scene opens, also in the HUD, which stays open from one scene to the next. For example: in the HUD, reset the stopwatch at each level. In an ordinary scene, On Start is enough.
- To do something from time to time (every 2 seconds): Repeat.
Condition, If a variable… or If / Else?
- If a variable…: the simplest. You choose the variable, the comparison in a list (is at least, is at most, equals…) and the number: nothing to write. For example: if
viesis at most 0 → True → lost. It only compares numbers. - Condition: you write the comparison, with everything a formula allows:
score >= 10,player.x > 500,prenom = "Léa". Outputs True, False, and Then (afterwards, in both cases). - If / Else: two conditions in a row: If the 1st is true, otherwise Else if the 2nd is true, otherwise Else. For example: gold, silver or bronze medal depending on the score.
- One output per number (1, 2, 3…), up to 6 cases: By value.
Move Object, Glide to, Push object, Push at an angle or Push (physics force)?
- Move Object: teleports the object at once to X, Y. For example: putting the player back at the start.
- Glide to: takes it smoothly to X, Y, during the chosen time; the next nodes don't wait. For example: a menu that slides into the screen. These two go through walls.
- Push object: moves it by a small step (X and Y are added to its position); a character stops against walls. Repeat it (Object Held Down, Every frame) to move forward. For example: an on-screen arrow that moves the hero.
- Push at an angle: gives it a push in a direction (0 = right, 90 = down, 180 = left, 270 = up); it keeps going on its own. For example: a spring that sends the player diagonally.
- Push (physics force): only for a Realistic physics object: a real force. "A hit" = an instant push (a kick); "Steady push" = to repeat every frame (rocket, wind).
Stop the object, Stop movements or Stop the movement?
- Stop the object: cuts its speed and pushes at once, and also Move forward continuously, Chase an object and Flee an object. For example: an enemy frozen by an ice spell.
- Stop movements: all of that, plus Go to an object (path), Spin the object continuously and Play movement (steps). The most complete. For example: freezing everything when the game is lost.
- Stop the movement: stops only Play movement (steps) (a movement made with Create a movement). For example: stopping a moving bridge when a button is touched.
- None of the three stops Follow the path (use Stop following the path) or Glide to. The behaviour (joystick, Patrol (back and forth)…) goes on: to change it, Change the behavior.
Random number (node), Random number (green wire) or random()?
- Random number (Variables & Inventory category): a node that puts a random number into a variable. For example: a dice roll,
random(1, 6)into the variablede. random(1, 6): to write in any formula, with the = sign:=random(1, 6). For example: the X of a coin,=random(0, 800).- Random number (Values (green wires) category): a green node (a value) to plug into a setting with Connect a value, without writing anything. It is drawn again each time.
- All three give whole numbers, both limits included:
random(1, 6)gives 1, 2, 3, 4, 5 or 6.
Transparency, Fade or Screen fade?
- Transparency: changes an object's transparency at once (0 = invisible, 1 = normal). For example: a ghost at 0.5.
- Fade: the same thing smoothly, during the chosen time; the next nodes don't wait. For example: a title that disappears in 1 second.
- Screen fade: the whole screen fades to a colour, or comes back; it goes on from one scene to the next. For example: a fade to black between two levels.
- An object made invisible with Transparency or Fade still receives touches: to really hide it, Visibility.
- With a shape (circle, star…): Screen transition (circle, star…) or Go to scene with a transition.
Parent Object, Link two objects, Link two objects (physics) or Attach two objects (3D)?
- Parent Object (Inspector, For the nodes (tag, parent) part): the object becomes the child of another and follows it everywhere, in the editor and in the game; it is hidden with it. Also: long-press its name in the object list, then drag it onto the parent. For example: a hat on a character.
- Link two objects (Objects (create, destroy, shoot) category): the same thing, during the game: object A becomes the child of B. For example: the hero picks up a sword, which then follows him.
- Link two objects (Physics category): a real physical link, in 2D (hinge, rod, spring, rope, wheel…), between Realistic physics objects: they swing, pull, bounce. For example: a pendulum, a bridge of planks. Cut a link undoes it.
- Attach two objects (3D): the same in 3D (hinge, ball joint, spring, welded), with 3D physics objects; Detach (3D) separates them. For example: a door that swings. To hold an object in the hand: Attach to a hand (3D).
Pause the game, Game speed (slow motion) or Hit stop?
- Pause the game: the scene stops (movements, timers, music) until Resume the game. The pause buttons go in a HUD. For example: a pause menu, see A pause menu.
- Game speed (slow motion): the whole game goes slower or faster (1 = normal, 0.5 = slow motion, 2 = twice as fast) and stays that way until you set 1 again. For example: slow motion when the hero jumps over the boss.
- Hit stop: freezes (almost) the whole game for a very short moment, then the game goes on by itself. For example: 0.06 second when an enemy explodes, to give the hit more power.
Game variable or object variable?
- Game variable (GAME VARIABLES, or New variable… in a node's settings): a single value for the whole game, kept from one scene to the next. For example:
score,vies. - Object variable: each object has its own, and each copy too. For example: the
vie(life) of each enemy. It is created with a node: Give health to the object (vie), Change a statistic (any name you like) or Give a row's values (table). - To read it in a formula: the object's name, a dot, then the variable:
=ennemi.vie, or=implique.viefor the involved object (the touched object). - To change it: Change a statistic; to test it: If the statistic…. See also Creating and using a variable.
Save state or Save variables to a file?
- Save state: a checkpoint during the game. It keeps the scene's objects and the game variables in memory; Restore state puts everything back as it was at that moment. Only one checkpoint at a time, and everything is lost when the game is closed. For example: a flag in the middle of the level.
- Save variables to a file: writes the variables on the phone: they are still there when the player opens the game again. Load variables from a file gets them back. The position of objects is not kept. For example: the best score, the level reached.
- How to: Keeping the score (saving).
Falls and bounces or Realistic physics?
- Falls and bounces (in ⚙ Object behavior): simple and light. The object falls straight down, bounces more or less (Bounce, Gravity) and stops on Ground / wall objects. It does not turn or roll. For example: a falling fruit, a bouncing coin.
- Realistic physics: like in real life. The object rolls, turns, stacks up, pushes the others. Settings: Object type, Material (wood, ice, rubber…), Weight, Bounce… For example: a pile of crates that collapses.
- Only Realistic physics objects work with Link two objects, Push (physics force), Explosion (physics blast) and On Impact (Physics).
👉 For the details of each node: the Blueprint's Help button → All nodes explained.