Prototype/Unit: Difference between revisions
(→pollution_to_join_attack: wording) |
(0.17) |
||
Line 6: | Line 6: | ||
== Usage in base== | == Usage in base== | ||
*[[Enemies|biters/spitters]] | *[[Enemies|biters/spitters]] | ||
== Mandatory properties == | == Mandatory properties == | ||
This prototype inherits all the properties from [[Prototype/EntityWithHealth]]. | This prototype inherits all the properties from [[Prototype/EntityWithHealth]]. | ||
Line 19: | Line 20: | ||
=== movement_speed === | === movement_speed === | ||
'''Type''': [[Types/float]] | '''Type''': [[Types/float]] | ||
Must be equal to or greater than 0. | |||
=== distance_per_frame === | === distance_per_frame === | ||
Line 37: | Line 40: | ||
Note: Setting to 50 or above can lead to undocumented behavior of individual units creating groups on their own when attacking or being attacked. | 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''': [[Types/UnitAISettings]] | |||
== Optional properties == | == Optional properties == | ||
=== idle_animation === | |||
'''Type''': [[Types/RotatedAnimation]] | |||
=== rotation_speed === | |||
'''Type''': [[Types/double]] | |||
'''Default''': 0.025 | |||
=== dying_sound === | === dying_sound === | ||
Line 45: | Line 59: | ||
The sound file to play when entity dies. | The sound file to play when entity dies. | ||
=== | === min_pursue_time === | ||
'''Type''': [[Types/uint32]] | '''Type''': [[Types/uint32]] | ||
Line 66: | Line 80: | ||
'''Default''': 50 | '''Default''': 50 | ||
=== radar_range === | |||
'''Type''': [[Types/uint32]] | |||
'''Default''': 0 | |||
=== move_while_shooting === | |||
'''Type''': [[Types/bool]] | |||
'''Default''': false | |||
=== can_open_gates === | |||
'''Type''': [[Types/bool]] | |||
'''Default''': false | |||
=== affected_by_tiles === | |||
'''Type''': [[Types/bool]] | |||
'''Default''': false | |||
=== render_layer === | |||
'''Type''': [[Types/RenderLayer]] | |||
'''Default''': "object" | |||
=== alternative_attacking_frame_sequence === | |||
'''Type''': [[Types/table]] | |||
Table with the following mandatory properties: | |||
* warmup_frame_sequence - Array of [[Types/float]] - Indices of frames from the attack parameter animation. | |||
* warmup2_frame_sequence - Array of [[Types/float]] - Indices of frames from the attack parameter animation. | |||
* attacking_frame_sequence - Array of [[Types/float]] - Indices of frames from the attack parameter animation. | |||
* cooldown_frame_sequence - Array of [[Types/float]] - Indices of frames from the attack parameter animation. | |||
* prepared_frame_sequence - Array of [[Types/float]] - Indices of frames from the attack parameter animation. | |||
* back_to_walk_frame_sequence - Array of [[Types/float]] - Indices of frames from the attack parameter animation. | |||
* warmup_animation_speed - [[Types/float]] | |||
* attacking_animation_speed - [[Types/float]] | |||
* cooldown_animation_speed - [[Types/float]] | |||
* prepared_animation_speed - [[Types/float]] | |||
* back_to_walk_animation_speed - [[Types/float]] |
Revision as of 16:43, 9 April 2019
Basics
Prototype type: unit
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
Must be equal to or greater than 0.
distance_per_frame
Type: Types/float
pollution_to_join_attack
Type: Types/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: Types/uint32
vision_distance
Type: Types/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: Types/UnitAISettings
Optional properties
idle_animation
Type: Types/RotatedAnimation
rotation_speed
Type: Types/double
Default: 0.025
dying_sound
Type: Types/Sound
The sound file to play when entity dies.
min_pursue_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
radar_range
Type: Types/uint32
Default: 0
move_while_shooting
Type: Types/bool
Default: false
can_open_gates
Type: Types/bool
Default: false
affected_by_tiles
Type: Types/bool
Default: false
render_layer
Type: Types/RenderLayer
Default: "object"
alternative_attacking_frame_sequence
Type: Types/table
Table with the following mandatory properties:
- warmup_frame_sequence - Array of Types/float - Indices of frames from the attack parameter animation.
- warmup2_frame_sequence - Array of Types/float - Indices of frames from the attack parameter animation.
- attacking_frame_sequence - Array of Types/float - Indices of frames from the attack parameter animation.
- cooldown_frame_sequence - Array of Types/float - Indices of frames from the attack parameter animation.
- prepared_frame_sequence - Array of Types/float - Indices of frames from the attack parameter animation.
- back_to_walk_frame_sequence - Array of Types/float - Indices of frames from the attack parameter animation.
- warmup_animation_speed - Types/float
- attacking_animation_speed - Types/float
- cooldown_animation_speed - Types/float
- prepared_animation_speed - Types/float
- back_to_walk_animation_speed - Types/float