prof-turbo wrote:You died
You died
You died
I think I'll make a minetest game with that mod !
failed to load and run /home/2232/minetest/bin/../mods/zombie/init.lua
mobs:register_spawning_mob({
resource_name = "zombies:zombie",
ak399g wrote:Alright, so here's a legitimate question:
I'm in the .lua looking at the section that beginsYour 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
mobs:register_spawning_mob({
resource_name = "zombies:zombie",
I'm able to edit the light_damage so that they die eventually in the daytime, but the problem is they also would die when exposed to torches and other such things. Is there a way for them to die off in the daytime, but not when exposed to artificial light?
local light = minetest.env:get_node_light(pos1, nil)
local time_of_day = minetest.env:get_timeofday()
local meta = minetest.env:get_meta(pos)
if light == nil then light = 0 end
-- turn on panel only during day time and if sufficient light
-- I know this is counter intuitive when cheating by using other light sources underground.
if light >= 12 and time_of_day>=0.24 and time_of_day<=0.76 and pos.y > -10 then
local charge_to_give=math.floor(light*(light*0.0867+pos1.y/130*0.4333))
if charge_to_give<0 then charge_to_give=0 end
if charge_to_give>26 then charge_to_give=26 end
meta:set_string("infotext", "Solar Panel is active ("..charge_to_give.."EU)")
meta:set_int("LV_EU_supply", charge_to_give)
else
meta:set_string("infotext", "Solar Panel is inactive");
meta:set_int("LV_EU_supply", 0)
end
end,
local do_env_damage = function(self)
local pos = self.object:getpos()
local n = minetest.env:get_node(pos)
if self.light_damage and self.light_damage ~= 0
and pos.y>0
and minetest.env:get_node_light(pos)
and minetest.env:get_node_light(pos) > 4
and minetest.env:get_timeofday() > 0.2
and minetest.env:get_timeofday() < 0.8
then
self.object:set_hp(self.object:get_hp()-self.light_damage)
if self.object:get_hp() == 0 then
self.object:remove()
end
end
ak399g wrote:Just finished testing. Seems like the mod that prevented me from being damaged also prevented them from being damaged. Once again, this mod is in the clear.
I sorta feel like an idiot now.
At any rate, I love how they jump randomly. It A.) intimidates you; B.) overwhelms you with bodies; C.) allows them to jump on top of each other to climb over high walls, and; D.) climb hills. Granted, point 'D' will become moot with 0.4.8, but that doesn't matter.
Only thing I wish they could do was smash through doors and windows (glass). Because you can select and hit them with your sword through doors and windows, I only wish they could try to do the same to you by breaking what should be weak material.
Users browsing this forum: No registered users and 10 guests