Target Nearby Sensor¶
文档版本:1.21.50.25
Defines the entity's range within which it can see or sense other entities to target them.
架构¶
target_nearby_sensor:
{
boolean "must_see" : opt
number "inside_range" : opt
event_object "on_inside_range"
event_object "on_outside_range"
event_object "on_vision_lost_inside_range"
number "outside_range" : opt
}
must_see
:boolean- Whether the other entity needs to be visible to trigger
inside
events.
inside_range
:number- Maximum distance in blocks that another entity will be considered in the
inside
range.
on_inside_range
:event_object- Event to call when an entity gets in the inside range. Can specify
event
for the name of the event andtarget
for the target of the event
on_outside_range
:event_object- Event to call when an entity gets in the outside range. Can specify
event
for the name of the event andtarget
for the target of the event
on_vision_lost_inside_range
:event_object- Event to call when an entity exits visual range. Can specify
event
for the name of the event andtarget
for the target of the event
outside_range
:number- Maximum distance in blocks that another entity will be considered in the
outside
range.