https://s31.postimg.org/5nhckihnf/screenshot_20160616_081407.pngI've been trying to make a centipede for mobs_redo.
The head segment is a seperate mob, and it spawns segments behind it.
Unfortunately there are two problems;
1: there is a gap between the head and body(as shown in the screenshot)
Currently this is what spawns the bodyparts:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
do_custom = function(self, dtime)
local pos = self.object:getpos()
minetest.env:add_entity(pos, "horror:centipede_body")
minetest.after(0.5, function()
minetest.env:add_entity(pos, "horror:centipede_body")
end)
end,
Is there a faster of better way I could do this?
2: The body segments keep running away and not chasing after the head as they should.
They are set to attack monsters(the head), so they should be following it. Is there a better way to make them follow the head?