Page 1 of 1

Rotatable dummy for an animation

Posted: Sat Mar 16, 2019 1:04 am
by ownlyme
Is there any kind of entity i can spawn to display a procedurally rotated graphic?
I tried the projectile prototype but it's shaking like wild.
Any idea?

Code: Select all

{
    type = "projectile",
    name = "explosion-1",
    flags = {"not-on-map","placeable-off-grid"},
    --collision_box = {{-0.05, -0.25}, {0.05, 0.25}},
    acceleration = 0,
    direction_only = true, -- tire nao persegue -- tiro reto
	rotatable = true,
    action =
    {
      type = "direct",
      action_delivery =
      {
        type = "instant",
        target_effects =
        {
          {
            type = "damage",
            damage = {amount = 50 , type = "electric"}
          }
        }
      }
    },
	animation =
	  {
        filename = "__explosions__/graphics/1.png",

        width = 409,
        height = 343,
        frame_count = 25,
        line_length = 5,
        animation_speed = 0.4,
		scale = 1.2,
      },
	light = {intensity = 0.6, size = 10,color=blue},
	speed = 0
  }

Re: Rotatable dummy for an animation

Posted: Sat Mar 16, 2019 1:39 am
by Bilka
How about just using the script rendering? https://lua-api.factorio.com/latest/Lua ... _animation allows you to draw animation prototypes that you defined in the data stage (https://wiki.factorio.com/Prototype/Animation).

Re: Rotatable dummy for an animation

Posted: Sat Mar 16, 2019 10:20 am
by ownlyme
Hmm thats for 0.17 :(

Re: Rotatable dummy for an animation

Posted: Sat Mar 16, 2019 12:06 pm
by darkfrei
ownlyme wrote: Sat Mar 16, 2019 10:20 am Hmm thats for 0.17 :(
Do you want to make mods for old game version?

Re: Rotatable dummy for an animation

Posted: Sun Mar 17, 2019 12:13 pm
by ownlyme
Yes because 0.17 is garbage ;)