Basic flame effect for bonfire
parent
5a7041e758
commit
0ef26a2074
|
@ -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 |
Loading…
Reference in New Issue