跳转至

Fire At Target

文档版本:1.21.50.25

Allows an entity to attack by firing a shot with a delay. Anchor and offset parameters of this component overrides the anchor and offset from projectile component.

架构

fire_at_target:
{
  priority "priority"
  number "attack_cooldown" : opt
  vector_of_3_items "attack_range"
  integer "owner_anchor" : opt
  vector_of_3_items "owner_offset"
  integer "target_anchor" : opt
  vector_of_3_items "target_offset"
  number "post_shoot_delay" : opt
  number "pre_shoot_delay" : opt
  string "projectile_def" : opt
  number "ranged_fov" : opt
  number "max_head_rotation_x" : opt
  number "max_head_rotation_y" : opt
  filters "filters"
}
prioritypriority
priority:
integer
attack_cooldownnumber
The cooldown time in seconds before this goal can be used again.
attack_rangevector_of_3_items
Target needs to be within this range for the attack to happen.
vector_of_3_items:
array
{
  number "0..0" : opt
  number "1..1" : opt
  number "2..2" : opt
}
0..0number
The X component.
1..1number
The Y component.
2..2number
The Z component.
owner_anchorinteger
Entity anchor for the projectile spawn location.
owner_offsetvector_of_3_items
Offset vector from the owner_anchor.
target_anchorinteger
Entity anchor for projectile target.
target_offsetvector_of_3_items
Offset vector from the target_anchor.
post_shoot_delaynumber
Time in seconds between firing the projectile and ending the goal.
pre_shoot_delaynumber
Time in seconds before firing the projectile.
projectile_defstring
Actor definition to use as projectile for the ranged attack. The actor must be a projectile.
ranged_fovnumber
Field of view (in degrees) when using sensing to detect a target for attack.
max_head_rotation_xnumber
Maximum head rotation (in degrees), on the X-axis, that this entity can apply while trying to look at the target.
max_head_rotation_ynumber
Maximum head rotation (in degrees), on the Y-axis, that this entity can apply while trying to look at the target.
filtersfilters
一个过滤器组。Conditions that need to be met for the behavior to start.