type | :: defines.segmented_unit_ai_state | Type of the AI state. |
Type of the AI state. |
Other attributes may be specified depending on type
:
defines.segmented_unit_ai_state.patrolling
waypoint | :: uint | Index into the unit's territory's LuaTerritory::get_patrol_path array. If the unit is not assigned to a territory, then this value is an index into a patrol path that the engine internally uses to guide the segmented unit and cannot be directly accessed. See SegmentedUnitPrototype::territory_radius. |
Index into the unit's territory's LuaTerritory::get_patrol_path array. If the unit is not assigned to a territory, then this value is an index into a patrol path that the engine internally uses to guide the segmented unit and cannot be directly accessed. See SegmentedUnitPrototype::territory_radius. | ||
destination | :: MapPosition | Read-only. The position of the |
Read-only. The position of the |
defines.segmented_unit_ai_state.investigating
destination | :: MapPosition | The position where the unit detected a disturbance in its territory and is presently navigating towards. |
The position where the unit detected a disturbance in its territory and is presently navigating towards. |
defines.segmented_unit_ai_state.attacking
target | :: LuaEntity? | The entity that the unit is attacking. May be nil if the entity has been destroyed or is otherwise invalid, but the segmented unit has not had an opportunity to update its AI. |
The entity that the unit is attacking. May be nil if the entity has been destroyed or is otherwise invalid, but the segmented unit has not had an opportunity to update its AI. | ||
destination | :: MapPosition? | Read-only. The position of |
Read-only. The position of |
defines.segmented_unit_ai_state.enraged_at_target
last_damage_time | :: MapTick | The map tick when the segmented unit was last attacked. Controls how long the segmented unit will remain enraged before returning to one of the other states. See SegmentedUnitPrototype::enraged_duration. |
The map tick when the segmented unit was last attacked. Controls how long the segmented unit will remain enraged before returning to one of the other states. See SegmentedUnitPrototype::enraged_duration. | ||
remaining_time | :: MapTick | Read-only. The number of ticks the segmented unit will remain enraged before transitioning to one of the non-enraged states. This field is provided as a convenience when reading the AI state but is not used during parsing. |
Read-only. The number of ticks the segmented unit will remain enraged before transitioning to one of the non-enraged states. This field is provided as a convenience when reading the AI state but is not used during parsing. | ||
target | :: LuaEntity? | The entity that the unit is attacking. May be nil if the entity has been destroyed or is otherwise invalid, but the segmented unit has not had an opportunity to update its AI. |
The entity that the unit is attacking. May be nil if the entity has been destroyed or is otherwise invalid, but the segmented unit has not had an opportunity to update its AI. | ||
attacked_me | :: boolean | True if the |
True if the | ||
destination | :: MapPosition? | Read-only. The position of |
Read-only. The position of |
defines.segmented_unit_ai_state.enraged_at_nothing
last_damage_time | :: MapTick | The map tick when the segmented unit was last attacked. Controls how long the segmented unit will remain enraged before returning to one of the non-enraged states. See SegmentedUnitPrototype::enraged_duration. |
The map tick when the segmented unit was last attacked. Controls how long the segmented unit will remain enraged before returning to one of the non-enraged states. See SegmentedUnitPrototype::enraged_duration. | ||
remaining_time | :: MapTick | Read-only. The number of ticks the segmented unit will remain enraged before transitioning to one of the non-enraged states. This field is provided as a convenience when reading the AI state but is not used during parsing. |
Read-only. The number of ticks the segmented unit will remain enraged before transitioning to one of the non-enraged states. This field is provided as a convenience when reading the AI state but is not used during parsing. | ||
destination | :: MapPosition | The arbitrary position the segmented unit is navigating to while searching for a nearby attack target. |
The arbitrary position the segmented unit is navigating to while searching for a nearby attack target. |