Page 1 of 1

Is it possible to make a tool set things on fire?

PostPosted: Wed Dec 05, 2012 04:59
by Chinchow
Title says it all.

PostPosted: Wed Dec 05, 2012 07:02
by Aqua
Yes, from my caveman mod:

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
minetest.register_craftitem("caveman:flint_and_steel", {
    description = "Flint And Steel",
    inventory_image = "caveman_flint_and_steel.png",
    stack_max = 1,
    liquids_pointable = false,
    on_use = function(itemstack, user, pointed_thing)
        n = minetest.env:get_node(pointed_thing)
        if pointed_thing.type == "node" then
            minetest.env:add_node(pointed_thing.above, {name="fire:basic_flame"})
        end
    end,
})

PostPosted: Thu Dec 06, 2012 02:13
by Josh
Lol, i just thought. You could make a flaming sword or pickaxe that sets players/objects on fire :D