diff --git a/init.lua b/init.lua index 7d6a79a..a3af75f 100644 --- a/init.lua +++ b/init.lua @@ -29,16 +29,18 @@ end guards.guard_data = { -- type needs to be "npc" - else it doesn't know how to follow type = "npc", -- "guard", - passive = true, + passive = false, -- we are a guard... damage = 9, attack_type = "dogfight", attacks_monsters = true, + attack_monsters = true, attack_npcs = false, + attack_chance = 80, owner_loyal = false, pathfinding = false, hp_min = 60, hp_max = 100, - armor = 0, + armor = 100, collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}, visual = "mesh", visual_size = {x = 1, y = 1}, diff --git a/patrol.lua b/patrol.lua index 29ae4b9..469e874 100644 --- a/patrol.lua +++ b/patrol.lua @@ -94,7 +94,7 @@ end guards.on_step = function(self, dtime, moveresult) - if(self.order ~= "patrol") then + if(self.order ~= "patrol" or self.state == "attack") then return true end