Basic flame effect for bonfire

master
DanDuncombe 2013-11-11 17:15:43 +00:00 committed by Vanessa Ezekowitz
parent 5a7041e758
commit 0ef26a2074
4 changed files with 20 additions and 0 deletions

View File

@ -1,4 +1,24 @@
bonfire = {}
local null = {x=0, y=0, z=0}
local function add_fire(pos)
pos.y = pos.y-0.2
minetest.add_particle(pos, null, null, 4,
6, true, "bonfire_fire"..tostring(math.random(1,2)) ..".png")
pos.y = pos.y-0.2
minetest.add_particle(pos, null, null, 4,
6, true, "bonfire_fire"..tostring(math.random(1,2)) ..".png")
end
minetest.register_abm({
nodenames = {"bonfire:self_active"},
interval = 1,
chance = 1,
action = function(pos)
add_fire(pos)
end
})
bonfire.formspec =
"size[8,9]"..

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B