Creating explosions (entities) from the lua script

Place to get help with not working mods / modding interface.
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Creating explosions (entities) from the lua script

Post by ficolas »

I noticed that there is a type of entity called "explosion"

Code: Select all

  {
    type = "explosion",
    name = "huge-explosion",
    animation_speed = 5,
    animations =
    {
      {
        filename = "__base__/graphics/entity/huge-explosion/huge-explosion.png",
        priority = "extra-high",
        frame_width = 111,
        frame_height = 131,
        frame_count = 24,
        line_length = 5
      }
    },
    light = {intensity = 1, size = 50},
    smoke = "smoke",
    smoke_count = 20,
    smoke_slow_down_factor = 1,
    sound =
    {
      {
        filename = "__base__/sound/huge-explosion.wav",
        volume = 1.25
      }
    }
  },
Is there any way to spawn this like I can spawn a particle?

kovarex
Factorio Staff
Factorio Staff
Posts: 8194
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Creating explosions (entities) from the lua script

Post by kovarex »

Yes, you can, no special parameters are needed.

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Creating explosions (entities) from the lua script

Post by ficolas »

But I tried and it says that there is no name for that entity.
I will try again...

Post Reply

Return to “Modding help”