summaryrefslogtreecommitdiff
path: root/ghost.lua
diff options
context:
space:
mode:
authorFernando Carmona Varo <ferkiwi@gmail.com>2015-10-22 20:28:56 +0200
committerFernando Carmona Varo <ferkiwi@gmail.com>2015-10-22 20:28:56 +0200
commit1698cd05405af7d96242ed43c0bfb570a9e73dd5 (patch)
tree33654b67f5527da9c09137ea2c5998f8d430e9d4 /ghost.lua
parentf8e75176876652333b376398d982ad06ac26b66f (diff)
Ghosts should be immortal now, even with bigger collisionbox
Diffstat (limited to 'ghost.lua')
-rw-r--r--ghost.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/ghost.lua b/ghost.lua
index 228de59..4138e8f 100644
--- a/ghost.lua
+++ b/ghost.lua
@@ -26,10 +26,8 @@ for i in ipairs(ghosts) do
"mypacman_"..itm.."f.png",
"mypacman_"..itm.."s.png",
},
- groups = {immortal = 1},
velocity = {x=math.random(-1,1), y=0, z=math.random(-1,1)},
- collisionbox = {-0.01, -0.5, -0.01, 0.01, -0.49, 0.01},
- --collisionbox = {-0.25, -1.0, -0.25, 0.25, 0.48, 0.25},
+ collisionbox = {-0.25, -1.0, -0.25, 0.25, 0.48, 0.25},
is_visible = true,
automatic_rotate = true,
automatic_face_movement_dir = -90, -- set yaw direction in degrees, false to disable
@@ -131,6 +129,7 @@ for i in ipairs(ghosts) do
-- This function should load the saved state of the entity from a string
on_activate = function(self, staticdata)
+ self.object:set_armor_groups({immortal=1})
if staticdata and staticdata ~= "" then
local data = string.split(staticdata, ";")
if #data == 2 then