Assemble3

Wiki

Objects and instances

Everything that shows up in the game (character, enemy, button, text, background) is an object.

Object vs instance

  • The object (or object type) is the mold: name, images, behaviors and variables. It lives in the Object types list.
  • The instance is a copy of that mold placed at a position in the layout. A Coin can have ten instances.

Changing the mold changes every copy. Changing an instance (position, size, angle) only affects that one.

Objects belong to the whole project: any layout can use them.

Common object types

Type Used for
Sprite Images and animations: characters, items, enemies.
Text Score, lives, dialogue.
Tiled and Tiled background Floors and backgrounds that repeat.
9-patch Panels and boxes that stretch without distorting the borders.
Labeled button and other User interface objects Menus and buttons.
Text input A field the player types in.
Particles Smoke, sparks and other effects.

To create one, click Add object under Object types.

Animations

A sprite can have several animations (idle, walking, jumping), each with several frames. In the object editor, Add an animation creates a new one. In events, the Animation (by name) action picks which one to play.

Tip: name objects without accents or spaces (Player, GreenEnemy). It avoids mistakes when you use them in events.

Drawing order and layers

Each instance sits on a layer. Upper layers draw over lower ones, which is handy for the background and the score. See Layers and camera.

Families

A family groups different objects (for example Enemy1 and Enemy2 in the Enemies family). An event about the family applies to all its members.