In my specific case I'm looking for a way of detecting that an enemy has been distracted from its default wandering.
Code: Select all
struct.entity.set_command{
type = defines.command.compound,
structure_type = defines.compound_command.return_last,
commands = {
{
type = defines.command.go_to_location,
destination = struct.spawn,
radius = 10,
distraction = defines.distraction.by_damage
},
{
type = defines.command.wander,
radius = 15,
distraction = defines.distraction.by_enemy
}
}
}