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

# Factorio Prototype Docs Version 2.0.77

# CreateEntityTriggerEffectItem - Prototype Docs

## CreateEntityTriggerEffectItem :: struct

Inherits from TriggerEffectItem
Children CreateExplosionTriggerEffectItem CreateFireTriggerEffectItem CreateSmokeTriggerEffectItem

## Properties

- default
- sorted

type | :: `"create-entity"` |
entity_name | :: EntityID | The name of the entity that should be created.
The name of the entity that should be created.
offset_deviation optional | :: BoundingBox |
trigger_created_entity optional | :: boolean | If `true`, the on_trigger_created_entity event will be raised.
If `true`, the on_trigger_created_entity event will be raised.
check_buildability optional | :: boolean |
only_when_visible optional | :: boolean | Create the entity only when they are within a 200 tile range of any connected player.
Create the entity only when they are within a 200 tile range of any connected player.
tile_collision_mask optional | :: CollisionMaskConnector | Entity creation will not occur if any tile matches the collision condition. [...]
Entity creation will not occur if any tile matches the collision condition. [...]
offsets optional | :: array[Vector] | If multiple offsets are specified, multiple entities are created. [...]
If multiple offsets are specified, multiple entities are created. [...]
as_enemy optional | :: boolean | If true, creates the entity as a member of the enemy force. [...]
If true, creates the entity as a member of the enemy force. [...]
ignore_no_enemies_mode optional | :: boolean | If true and `as_enemy` is true, allows the entity to be created even if the current surface.no_enemies_mode is true.
If true and `as_enemy` is true, allows the entity to be created even if the current surface.no_enemies_mode is true.
find_non_colliding_position optional | :: boolean |
abort_if_over_space optional | :: boolean |
non_colliding_search_radius optional | :: double |
non_colliding_search_precision optional | :: double |
non_colliding_fail_result optional | :: Trigger | Only loaded if `find_non_colliding_position` is defined.
Only loaded if `find_non_colliding_position` is defined.
protected optional | :: boolean | The result entity will be protected from automated attacks of enemies.
The result entity will be protected from automated attacks of enemies.

Inherited from TriggerEffectItem

repeat_count optional | :: uint16 |
repeat_count_deviation optional | :: uint16 |
probability optional | :: float | Must be greater than `0` and less than or equal to `1`.
Must be greater than `0` and less than or equal to `1`.
affects_target optional | :: boolean |
show_in_tooltip[overridden] optional | :: boolean |
damage_type_filters optional | :: DamageTypeFilters | Guaranteed to work with EntityWithHealthPrototype::damaged_trigger_effect and EntityWithHealthPrototype::dying_trigger_effect. [...]
Guaranteed to work with EntityWithHealthPrototype::damaged_trigger_effect and EntityWithHealthPrototype::dying_trigger_effect. [...]

entity_name | :: EntityID | The name of the entity that should be created.
The name of the entity that should be created.
type | :: `"create-entity"` |
abort_if_over_space optional | :: boolean |
as_enemy optional | :: boolean | If true, creates the entity as a member of the enemy force. [...]
If true, creates the entity as a member of the enemy force. [...]
check_buildability optional | :: boolean |
find_non_colliding_position optional | :: boolean |
ignore_no_enemies_mode optional | :: boolean | If true and `as_enemy` is true, allows the entity to be created even if the current surface.no_enemies_mode is true.
If true and `as_enemy` is true, allows the entity to be created even if the current surface.no_enemies_mode is true.
non_colliding_fail_result optional | :: Trigger | Only loaded if `find_non_colliding_position` is defined.
Only loaded if `find_non_colliding_position` is defined.
non_colliding_search_precision optional | :: double |
non_colliding_search_radius optional | :: double |
offset_deviation optional | :: BoundingBox |
offsets optional | :: array[Vector] | If multiple offsets are specified, multiple entities are created. [...]
If multiple offsets are specified, multiple entities are created. [...]
only_when_visible optional | :: boolean | Create the entity only when they are within a 200 tile range of any connected player.
Create the entity only when they are within a 200 tile range of any connected player.
protected optional | :: boolean | The result entity will be protected from automated attacks of enemies.
The result entity will be protected from automated attacks of enemies.
tile_collision_mask optional | :: CollisionMaskConnector | Entity creation will not occur if any tile matches the collision condition. [...]
Entity creation will not occur if any tile matches the collision condition. [...]
trigger_created_entity optional | :: boolean | If `true`, the on_trigger_created_entity event will be raised.
If `true`, the on_trigger_created_entity event will be raised.

Inherited from TriggerEffectItem

affects_target optional | :: boolean |
damage_type_filters optional | :: DamageTypeFilters | Guaranteed to work with EntityWithHealthPrototype::damaged_trigger_effect and EntityWithHealthPrototype::dying_trigger_effect. [...]
Guaranteed to work with EntityWithHealthPrototype::damaged_trigger_effect and EntityWithHealthPrototype::dying_trigger_effect. [...]
probability optional | :: float | Must be greater than `0` and less than or equal to `1`.
Must be greater than `0` and less than or equal to `1`.
repeat_count optional | :: uint16 |
repeat_count_deviation optional | :: uint16 |
show_in_tooltip[overridden] optional | :: boolean |

## Properties

### type :: `"create-entity"`

### entity_name :: EntityID

The name of the entity that should be created.

### offset_deviation :: BoundingBox optional

### trigger_created_entity :: boolean optional

Default: `false`

If `true`, the on_trigger_created_entity event will be raised.

### check_buildability :: boolean optional

Default: `false`

### only_when_visible :: boolean optional

Default: `false`

Create the entity only when they are within a 200 tile range of any connected player.

### tile_collision_mask :: CollisionMaskConnector optional

Entity creation will not occur if any tile matches the collision condition. Defaults to no collisions.

### offsets :: array[Vector] optional

If multiple offsets are specified, multiple entities are created. The projectile of the Distractor capsule uses this property to spawn three Distractors.

### as_enemy :: boolean optional

Default: `false`

If true, creates the entity as a member of the enemy force. If the surface.no_enemies_mode is true, the entity will not be created.

### ignore_no_enemies_mode :: boolean optional

Default: `false`

If true and `as_enemy` is true, allows the entity to be created even if the current surface.no_enemies_mode is true.

### find_non_colliding_position :: boolean optional

Default: `false`

### abort_if_over_space :: boolean optional

Default: `false`

### non_colliding_search_radius :: double optional

Default: `5`

### non_colliding_search_precision :: double optional

Default: `0.2`

### non_colliding_fail_result :: Trigger optional

Only loaded if `find_non_colliding_position` is defined.

### protected :: boolean optional

Default: `false`

The result entity will be protected from automated attacks of enemies.

## Overridden Properties

### show_in_tooltip :: boolean optional

Default: `false`

Type used in

- TriggerEffect