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

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

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

by Chinchow » Wed Dec 05, 2012 04:59

Title says it all.
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Wed Dec 05, 2012 07:02

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,
})
Last edited by Aqua on Wed Dec 05, 2012 07:55, edited 1 time in total.
Hi there ^.~
 

Josh
Member
 
Posts: 1146
Joined: Fri Jun 29, 2012 23:11

by Josh » Thu Dec 06, 2012 02:13

Lol, i just thought. You could make a flaming sword or pickaxe that sets players/objects on fire :D
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 13 guests

cron