Prototype/Unit

From Official Factorio Wiki
Revision as of 09:20, 22 May 2018 by Bilka (talk | contribs) (0.16)
Jump to navigation Jump to search

Basics

Entity that attacks player based on pollution value. Extends the Prototype/EntityWithHealth

Usage in base

Mandatory properties

This prototype inherits all the properties from Prototype/EntityWithHealth.

run_animation

Type: Types/RotatedAnimation

attack_parameters

Type: Types/AttackParameters

Requires animation in attack_parameters. Requires ammo_type in attack_parameters.

movement_speed

Type: Types/float

distance_per_frame

Type: Types/float

pollution_to_join_attack

Type: Types/float

Pollution level required before entity will leave it's spawner and attack the source of the pollution.

distraction_cooldown

Type: Types/uint32

vision_distance

Type: Types/double

Max is 100.

Optional properties

dying_sound

Type: Types/Sound

The sound file to play when entity dies.

min_persue_time

Type: Types/uint32

Default: 10 * 60

has_belt_immunity

Type: Types/bool

Default: false

If the unit is immune to movement by belts.

spawning_time_modifier

Type: Types/double

Default: 1

max_pursue_distance

Type: Types/double

Default: 50