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