← Yop2D

The “Object behavior” window in pictures

Beginner guide · no code

Français · English · Español · Deutsch · Italiano · Português · Русский · 中文 · 日本語

This window says how an object behaves in the game. You open it from the Inspector, with the Object behavior button. It replaces many settings that used to be done by hand.

The eight ways to move

You choose only one. Here is each choice with the engine's own sentence:

The window at a glance

Screenshot of the Object behavior window, top to bottom, with 13 numbered marks
The window for a platformer character (in French). The numbers are explained below.
  1. 1
    HOW DOES IT MOVE? (one choice): this is the object's behavior.
  2. 2
    The active choice is blue, with a filled circle. Tap another choice to change.
  3. 3
    The note about nodes: nodes come first. If a node moves the object (Move, Push, Glide to…), it does what the node says, even if the behavior says something else.
  4. 4
    Its settings: this part changes with the choice above. Here, the settings of a platformer character.
  5. 5
    Controls: how the player steers it. Joystick, Buttons (left, right…), or None (it is driven by your nodes: an enemy, a non-player character).
  6. 6
    Speed: Slow, Normal or Fast.
  7. 7
    Jump button: choose a button from your game. With no button, you jump by pushing the joystick up.
  8. 8
    Jump height: Small, Medium or High.
  9. 9
    Can climb ladders: yes or no. You need “ladder” objects in the scene.
  10. 10
    Automatic animations: when it is yes, the object changes its image by itself according to what it does.
  11. 11
    The list of states: each state of the object (Standing still, Walking, In the air, On the ladder, Down on the ground) with the animation name it expects (idle, walk, jump, climb, duck). “— missing (optional)” means you do not have an animation with that name yet: the image does not change. Give these names to your animations (Animation window). With several characters, start with the object's name (for example player_marche). Tap a line to choose the animation yourself.
  12. 12
    IT IS ALSO… (several choices): A ladder (platformer characters can climb it), Collectable (can go into the inventory) and “in front / behind depending on position” (for top-down or isometric views).
  13. 13
    Contact area: Where it collides: Whole object or Custom. For custom, set the area with the handles on the object, or in the Inspector's “Contact area”.