ℹ️ 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
You placed an object and wonder what its settings are for? Here are the most asked questions, with a short answer. An object's settings are in the Inspector: tap the object, then open the INSPECTOR panel (arrow at the top right). Names in bold are the ones you see on the screen.
👉 A word you don't understand? See Yop2D words. Looking for a button? See Where is…?.
What is “Can be dragged with a finger (in game)” for?
- When on, the player can grab the object and drag it with a finger during the game (a puzzle piece, a card, a magnet…).
- It is the same as the Dragged with a finger behavior in ⚙ Object behavior. The object stops against walls.
- To react when the player picks it up or lets it go: events Drag Start and Drag End. See Drag an object with a finger.
What is “Locked (doesn't move with your finger)” for?
- It is the padlock, to the right of the object in the object list of the RESOURCES panel, and at the top of the Inspector.
- When closed, the object no longer moves in the editor: you can't move it or resize it with your finger by mistake. Handy for a background or a big scenery.
- It gets an orange frame when you select it. It changes nothing in the game. Tap the padlock again to unlock it.
What is “Visible in the game” for?
- When off, the object is there, but hidden when the game starts. In the editor, it is just paler. It is also the eye to the right of the object in the object list.
- To show it during the game: node Visibility (Visible = yes). To animate it at the same time, see “make an object appear smoothly” below.
- A hidden model is often used to make copies: the copies are visible. See Hide and show an object.
What is a tag (object family)?
- A word you give to several objects to target them all at once: “enemy”, “coin”, “wall”. Set it in the Inspector, part For the nodes (tag, parent), line Tag (family of objects).
- In the nodes, choose “# enemy” instead of an object: If object touches Tag, Destroy by Tag, For each object (with a tag)…
- An object can have several tags, separated by commas: “enemy, flying”. Copies keep the tag of their model.
- During the game, Give a tag (object family) gives a new one. See Understand “On what?”.
What is “Parent Object” for?
- The object becomes the child of another one: when the parent moves, the child follows it, in the editor and in the game. Examples: a name or a health bar above a character, a sword in their hand.
- Inspector, part For the nodes (tag, parent), line Parent Object: choose the parent (None to detach it).
- Faster: in the object list, long press the object, then drag it onto its parent.
- When the parent is destroyed, its children disappear with it. The child follows the parent's position (not its rotation).
How do I put an object in front of another?
- Inspector, part Position and size, line Front / back (Z): In front puts it in front of all the others, Behind behind all the others.
- The number in the middle is its place: the bigger it is, the more the object is in front.
- During the game: node Bring to front / send back (bigger = in front).
- Objects of the Interface (HUD) (buttons, score) always stay in front of the scene.
How do I stick a button to the edge of the screen?
- Go to Menu → Game settings → Fit the player's screen and choose Fill (the game uses the whole screen, without black bars).
- Tap the button, then in the Inspector open Advanced (outline, screen) → Stick to the screen edge.
- Tap the arrow of the edge or corner you want (↖ ↑ ↗ ← → ↙ ↓ ↘). “·” = it doesn't move.
- On a phone longer than your game, the button stays stuck to that edge. Its children follow it.
How do I change the image of an object?
- In the editor: tap the image object, then in the Inspector, part Object settings: Change the image…. Edit the image… opens the retouch tool (eraser, transparent background…).
- During the game: node Change Image (for example a closed door that becomes open).
- For an image that moves (walk, jump): animations. See Animate with the movement.
How do I change the size without stretching?
- Inspector, part Position and size: tap the small chain at the end of the Size line (Keep proportions). The message Proportions kept appears.
- Change the width: the height follows by itself, the image is not squashed.
- Several objects selected with Choose: the Size % line enlarges them all together (200 = twice as big).
- During the game: node Grow / shrink, with the same number for the horizontal size and the vertical size.
How do I make an object appear smoothly?
- Inspector → Advanced (outline, screen) → Animated appear / disappear: Fade, Slides from the top (or bottom, left, right), Grows, Grows with a bounce. Also set the Duration (seconds).
- The animation plays when a node shows or hides the object (Visibility, for example). With Also at the start of the scene, it also plays at the start.
- Another way: the Fade node changes the transparency smoothly (0 = invisible, 1 = normal).
- This setting exists for 2D objects.
How do I give health points to an object?
- In 3D: Inspector, part Health → Health points (0 = none). Above it (during the game) can show its Health bar, Its name, or Its name and health bar. The Remove health points node lowers them; at zero, When an object has no health left starts and the object disappears.
- In 2D: this line is not in the Inspector. At start, use Give health to the object, then Deal damage at each hit (outputs “still alive” and “no more life”) and Heal for a potion.
- For the hero's life with a bar on the screen: Make a health bar or 3 lives.
How do I give a sound to an object (waterfall, fire)?
- In 3D: Inspector, part SOUND AROUND IT → Looping sound: choose a sound of the project. Set Heard up to (meters) and Volume (%).
- During the game, the sound loops where the object is: louder when you get closer. For a sound played only once at the same place: Play a sound at this spot (3D).
- In 2D, this setting doesn't exist: use the Play sound and Play music nodes. See Looping music.
How do I make an object glow?
- In 2D: node Glowing halo (color and size of the glow), for example on a bonus. For a real light that lights up around it (torch, lantern): Light source (torch, lantern…).
- In 3D, for a shape (cube, ball…): Inspector, part Material → Glows (lights up its surroundings): it glows with its color (crystal, magic ball).
- The Color blending (light effect) node set to “Additive” also gives a light effect to a flame. See Night and a lamp.
What is a “Zone” for?
- A rectangle invisible in the game used to detect a contact: a finish line, a trap, an exit door. Button Object → Basic shapes → Zone.
- When an object enters it: event Collision A/B (A = the hero, B = the zone). When it leaves: Exit Zone.
- Give a tag to several zones (“trap”) to watch them all with If object touches Tag.
- It doesn't block anyone. For a wall of free shape, see the next question.
What is “Multi-point zone” for?
- A wall or an enclosure of the shape you want (a hill, a cave, the edge of a lake). Object → Basic shapes → Multi-point zone.
- Drag the circles to change the shape; tap the small circle between two points to add one. Turn off Move in the top bar to see the circles.
- The mode button switches between Mode: no entry (wall) and Mode: no exit (pen). The hero and the enemies respect the limit.
- It is invisible in the game. To make it a ground you can see: Ground: invisible in the game (tap to fill it).
What is a prefab?
- A scene placed as a single object in another scene: an enemy, a button, a house… made once, placed everywhere.
- Object → Prefabs → Prefab (a scene placed here): choose the scene to place, or New empty scene for this prefab.
- Edit its scene (Inspector) opens its scene: What you change in its scene changes all its copies. Its nodes work in every copy.
- During the game: Place a copy of a scene places a new one, Destroy the copies of a scene removes them.
How do I give different values to each copy of a prefab?
- In a prefab's Inspector, the VALUES OF THIS COPY part lets you change the starting value of the variables of its own scene.
- But Yop2D Next can't create these scene variables yet: this part only appears for a project imported from the old Yop2D that had some.
- Meanwhile: for a really different copy (faster, other color), copy its scene with Duplicate the scene, change the copy, and place this new prefab.
How do I create copies of an object during the game?
- Place a model object (often hidden: Visible in the game off), then choose one of these 4 nodes:
- Create object: copies the object of the Object line and places it at position X, Y. Handy to copy The involved object (the touched object).
- Create a copy of the object: the same, but the model is chosen in Object B. Example: a stone that falls at a random place, X =
random(0, 800). - Generate clone (Spawner): no X, Y. The copy of Object B (the model) appears in the middle of object A (a cannon, a door), turned like it.
- Place a copy of a scene: copies a whole scene (a prefab) with its objects and its nodes, at X, Y. Remove them with Destroy the copies of a scene.
- With the first 3, the copy becomes The involved object (the touched object): the next node can set it up (speed, animation…). It is visible and in front of the others.
- The copy has another name than the model but keeps its tag: to make it react (contact, touch), target the tag (“# enemy”), not the name.
- To launch a projectile, there is also Shoot an object: see Shoot. For enemies that keep coming: Make enemies appear.
How do I destroy an object (or all the enemies)?
- One object: Destroy Object. After a contact, choose The involved object (the touched object) to destroy the coin or the enemy that was touched.
- All the objects of a family: Destroy by Tag (for example the tag “enemy” for a bomb).
- Later: Destroy the object after a delay (seconds) (an explosion that disappears after 0.5 second).
- Its children (Parent Object) disappear with it. The copies of a prefab: Destroy the copies of a scene.
How do I round the corners?
- An interface element (button, panel, list…): Inspector → Settings and style… → Shape: Rounded corners, then Corner rounding. There are also Pill and Circle.
- A Multi-point zone (hill, ramp): Inspector → Round the corners…: A little (small curve), Medium or A lot (big curve, ramp).
- A simple image can't be rounded in Yop2D Next: prepare it rounded (with transparent corners) before importing it.
How do I change the color of an object in the game?
- A shape (square, circle), a text or a button: node Modify Color. Write a name (red, green, blue, yellow, black, white…) or a code like
#FF8800. - An image: Modify Color doesn't change its colors. Use Color Filter (black and white, sepia, inversion; “None” to go back), or Team colour (replaces the pink in the drawing) to color a part of the drawing.
- To make it transparent: Fade or Transparency.
How do I make an object blink (when it is hit)?
- Node Blink: choose the object, the speed and the duration in milliseconds (1000 = 1 second; 0 = endless). Another Blink set to stop stops it.
- Blinking does not make it invincible by itself. For that: a variable “invincible” set to 1 when it is hit, Wait 1 second, then set back to 0.
- Before removing a life, If a variable… checks that “invincible” is 0. See 3 lives.
How do I flip an image (look to the left)?
- A character that moves with ⚙ Object behavior (Platform character, Patrol (back and forth), Top-down character) turns around by itself. Just say which way your drawing looks: Its picture faces left or right.
- Otherwise: node Mirror Effect / Invert (Horizontal = left / right, Vertical = up / down). Careful: each time it runs, the image flips; twice = back to the start.
- To choose a precise side, Set a property: the horizontal size at -1 (flipped) or at 1 (normal).
How do I make an object spin non-stop?
- Node Spin the object continuously, for example in On Start: speed in degrees per second (360 = one turn per second, negative = the other way, 0 = stop). A saw, a wheel, a propeller.
- In 3D, for a coin or a bonus: Inspector → Spins on itself (degrees per second) (scenery or pass-through object). To turn by a precise angle: Rotate (3D).
- The spinning stops when the game is paused.
How do I attach an object to another one in the game?
- So that an object follows another one: Link two objects (A = the one that follows, B = the one it follows). It is the Parent Object of the Inspector, but during the game.
- With physics (pendulum, bridge, rope, car): Link two objects in 2D (both objects have the physics behavior), Attach two objects (3D) in 3D; Cut a link or Detach (3D) to unhook.
- In 3D, a sword or a torch in the hand of an animated character: Attach to a hand (3D).
👉 Can't find it? Look at the “How to?” sheets and My game doesn't work.