Event Filters

Sets of filters used to filter specific events.

Examples of event filters:

script.set_event_filter(defines.events.on_built_entity, {{filter = "name", name = "fast-inserter"}})
script.set_event_filter(defines.events.on_entity_died, {{filter = "type", type = "unit"}, {filter = "name", name = "fast-inserter"}})

script.on_event(defines.events.on_entity_damaged,
  function(e) game.print("A wall was damaged on tick " .. e.tick) end,
  {{filter="type", type = "wall"}})

type LuaEntityDiedEventFilters
type LuaEntityMarkedForDeconstructionEventFilters
type LuaPreGhostDeconstructedEventFilters
type LuaUpgradeCancelledEventFilters
type LuaPlayerRepairedEntityEventFilters
type LuaEntityMarkedForUpgradeEventFilters
type LuaPostEntityDiedEventFilters
type LuaPreRobotMinedEntityEventFilters
type LuaEntityClonedEventFilters
type LuaRobotMinedEntityEventFilters
type LuaPrePlayerMinedEntityEventFilters
type LuaRobotBuiltEntityEventFilters
type LuaEntityDeconstructionCancelledEventFilters
type LuaPlayerBuiltEntityEventFilters
type LuaPlayerMinedEntityEventFilters
type LuaEntityDamagedEventFilters
type LuaSectorScannedEventFilters

LuaEntityDiedEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaEntityMarkedForDeconstructionEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaPreGhostDeconstructedEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaUpgradeCancelledEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaPlayerRepairedEntityEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaEntityMarkedForUpgradeEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaPostEntityDiedEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaPreRobotMinedEntityEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaEntityClonedEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaRobotMinedEntityEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaPrePlayerMinedEntityEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaRobotBuiltEntityEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaEntityDeconstructionCancelledEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaPlayerBuiltEntityEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaPlayerMinedEntityEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaEntityDamagedEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following:

LuaSectorScannedEventFilters

An array of filters. Each filter is a table:

Depending on the value of filter, the table may take additional fields. filter may be one of the following: