Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Runtime Docs Version 2.0.77

# TriggerItem - Runtime Docs

## TriggerItem :: table

#### Table fields

type | :: `"direct"` or `"area"` or `"line"` or `"cluster"` |
action_delivery | :: array[TriggerDelivery]? |
entity_flags | :: EntityPrototypeFlags? | The trigger will only affect entities that contain any of these flags.
The trigger will only affect entities that contain any of these flags.
ignore_collision_condition | :: boolean |
collision_mask | :: CollisionMask | The trigger will only affect entities that would collide with given collision mask.
The trigger will only affect entities that would collide with given collision mask.
trigger_target_mask | :: TriggerTargetMask |
force | :: ForceCondition | If `"enemy"`, the trigger will only affect entities whose force is different from the attacker's and for which there is no cease-fire set. `"ally"` is the opposite of `"enemy"`.
If `"enemy"`, the trigger will only affect entities whose force is different from the attacker's and for which there is no cease-fire set. `"ally"` is the opposite of `"enemy"`.
repeat_count | :: uint32 |
probability | :: float |

Other attributes may be specified depending on `type`:

#### `area`

radius | :: double |
trigger_from_target | :: boolean |
target_entities | :: boolean |
target_enemies | :: boolean |
collision_mode | :: `"distance-from-collision-box"` or `"distance-from-center"` |
show_in_tooltip | :: boolean |

#### `cluster`

cluster_count | :: uint32 |
distance | :: float |
distance_deviation | :: float |

#### `direct`

filter_enabled | :: boolean |

#### `line`

range | :: double |
width | :: double |
range_effects | :: array[TriggerEffectItem] |

Concept used in

- LuaEntityPrototype::attack_result
- LuaEntityPrototype::final_attack_result
- LuaEntityPrototype::created_effect
- LuaEntityPrototype::destroy_action
- LuaEntityPrototype::strike_effect
- LuaEntityPrototype::attractor_hit_effect
- LuaItemPrototype::destroyed_by_dropping_trigger
- LuaItemPrototype::trigger
- LuaSpaceLocationPrototype::player_effects
- LuaTilePrototype::default_destroyed_dropped_item_trigger
- AmmoType
- AttackReactionItem
- MineableProperties
- SpoilToTriggerResult
- TriggerEffectItem