Combat drone animation

Place to get help with not working mods / modding interface.
dewast
Inserter
Inserter
Posts: 30
Joined: Wed Apr 13, 2016 9:36 am
Contact:

Combat drone animation

Post by dewast »

hi,
is combat drone animation in .lua fix for :
--
idle =
{
layers =
--

I try borrow:
--
render_layer = "air-object",
final_render_layer = "air-object",
animation =
--
and got
Error while loading entity prototype "guardian-robot" (combat-robot): No such node (idle)
Modifications: Guardian
321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: Combat drone animation

Post by 321freddy »

You cannot use animation as a parameter for combat drones.
You have to use idle and in_motion which are animations for the two different states. (not moving and moving)

It has to look like this: (taken from defender drone prototype)

Code: Select all

    idle =
    {
      layers =
      {
        {
          filename = "__base__/graphics/entity/defender-robot/defender-robot.png",
          priority = "high",
          line_length = 16,
          width = 32,
          height = 33,
          frame_count = 1,
          direction_count = 16,
          shift = {0, 0.015625}
        },
        {
          filename = "__base__/graphics/entity/defender-robot/defender-robot-mask.png",
          priority = "high",
          line_length = 16,
          width = 18,
          height = 16,
          frame_count = 1,
          direction_count = 16,
          shift = {0, -0.125},
          apply_runtime_tint = true
        },
      }
    },
    shadow_idle =
    {
      filename = "__base__/graphics/entity/defender-robot/defender-robot-shadow.png",
      priority = "high",
      line_length = 16,
      width = 43,
      height = 23,
      frame_count = 1,
      direction_count = 16,
      shift = {0.859375, 0.609375}
    },
    in_motion =
    {
      layers =
      {
        {
          filename = "__base__/graphics/entity/defender-robot/defender-robot.png",
          priority = "high",
          line_length = 16,
          width = 32,
          height = 33,
          frame_count = 1,
          direction_count = 16,
          shift = {0, 0.015625},
          y = 33
        },
        {
          filename = "__base__/graphics/entity/defender-robot/defender-robot-mask.png",
          priority = "high",
          line_length = 16,
          width = 18,
          height = 16,
          frame_count = 1,
          direction_count = 16,
          shift = {0, -0.125},
          apply_runtime_tint = true,
          y = 16
        },
      }
    },
    shadow_in_motion =
    {
      filename = "__base__/graphics/entity/defender-robot/defender-robot-shadow.png",
      priority = "high",
      line_length = 16,
      width = 43,
      height = 23,
      frame_count = 1,
      direction_count = 16,
      shift = {0.859375, 0.609375}
    }
Also the render layers can't be changed for combat drones, but I think they default to "air-object" so you're fine.
Post Reply

Return to “Modding help”