Prototype/Unit
Prototype definitions » PrototypeBase » Prototype/Entity » Prototype/EntityWithHealth » Prototype/EntityWithOwner » Prototype/Unit
Entity that attacks players.
Usage in base
Mandatory properties
This prototype inherits all the properties from Prototype/EntityWithHealth.
run_animation
Type: RotatedAnimation
attack_parameters
Type: AttackParameters
Requires animation in attack_parameters. Requires ammo_type in attack_parameters.
movement_speed
Type: float
Must be equal to or greater than 0.
distance_per_frame
Type: float
pollution_to_join_attack
Type: float
The amount of pollution that has to be absorbed by the unit's spawner before the unit will leave the spawner and attack the source of the pollution.
distraction_cooldown
Type: uint32
vision_distance
Type: double
Max is 100.
Note: Setting to 50 or above can lead to undocumented behavior of individual units creating groups on their own when attacking or being attacked.
ai_settings
Type: UnitAISettings
Optional properties
rotation_speed
Type: double
Default: 0.025
dying_sound
Type: Sound
The sound file to play when entity dies.
min_pursue_time
Type: uint32
Default: 10 * 60
has_belt_immunity
Type: bool
Default: false
If the unit is immune to movement by belts.
spawning_time_modifier
Type: double
Default: 1
max_pursue_distance
Type: double
Default: 50
radar_range
Type: uint32
Default: 0
move_while_shooting
Type: bool
Default: false
can_open_gates
Type: bool
Default: false
affected_by_tiles
Type: bool
Default: false
render_layer
Type: RenderLayer
Default: "object"
alternative_attacking_frame_sequence
Type: table
Table with the following mandatory properties:
- warmup_frame_sequence - Array of float - Indices of frames from the attack parameter animation.
- warmup2_frame_sequence - Array of float - Indices of frames from the attack parameter animation.
- attacking_frame_sequence - Array of float - Indices of frames from the attack parameter animation.
- cooldown_frame_sequence - Array of float - Indices of frames from the attack parameter animation.
- prepared_frame_sequence - Array of float - Indices of frames from the attack parameter animation.
- back_to_walk_frame_sequence - Array of float - Indices of frames from the attack parameter animation.
- warmup_animation_speed - float
- attacking_animation_speed - float
- cooldown_animation_speed - float
- prepared_animation_speed - float
- back_to_walk_animation_speed - float