summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-02-25 13:47:16 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2017-02-25 13:47:16 +0000
commitf70cab689471ffa3c9ad16937808f37bf022b8d8 (patch)
tree3059ca6772842cc0d61946c959a937158be7336f
parentf7b9339dfc61f5f8b92acc031f797f788d901941 (diff)
tinkered with rat on_spawn function test
-rw-r--r--rat.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/rat.lua b/rat.lua
index 3320d53..31304eb 100644
--- a/rat.lua
+++ b/rat.lua
@@ -60,7 +60,10 @@ mobs:register_mob("mobs_animal:rat", {
local function rat_spawn(self, pos)
- print (self:get_luaentity().name, pos.x, pos.y, pos.z)
+ self = self:get_luaentity()
+ print (self.name, pos.x, pos.y, pos.z)
+ self.hp_max = 100
+ self.health = 100
end
mobs:spawn({