Factorio Prototype DocsVersion 2.0.26

AnimationVariations :: struct or Animation or array[Animation] Example code

Properties

sheet optional :: AnimationSheet

The variations are arranged vertically in the file, one row for each variation.

The variations are arranged vertically in the file, one row for each variation.

sheets optional :: array[AnimationSheet]

Only loaded if sheet is not defined.

Only loaded if sheet is not defined.

Properties

sheet :: AnimationSheet optional

The variations are arranged vertically in the file, one row for each variation.

sheets :: array[AnimationSheet] optional

Only loaded if sheet is not defined.

Examples

-- array of animations
animations =
{
  {
    filename = "__base__/graphics/entity/explosion-gunshot/explosion-gunshot.png",
    draw_as_glow = true,
    priority = "extra-high",
    width = 34,
    height = 38,
    frame_count = 2,
    animation_speed = 1.5,
    shift = {0, 0}
  },
  {
    filename = "__base__/graphics/entity/explosion-gunshot/explosion-gunshot.png",
    draw_as_glow = true,
    priority = "extra-high",
    width = 34,
    height = 38,
    x = 34 * 2,
    frame_count = 2,
    animation_speed = 1.5,
    shift = {0, 0}
  },
  -- [...]
}
-- animation sheet using "sheet"
pictures =
{
  sheet =
  {
    filename = "__base__/graphics/entity/character/footprints.png",
    line_length = 2,
    frame_count = 2,
    width = 30,
    height = 22,
    shift = util.by_pixel(0.25, 0.25),
    scale = 0.5,
    variation_count = 8
  }
}

Prototypes

Types

Defines