Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)
minetest.register_node("gravitygun:gun2", {
description = "Gravitygun",
range = 10,
stack_max = 1,
inventory_image = "gravitygun_gun2.png",
tiles = {"tiles"},
groups = {dig_immediate = 3},
paramtype = "light",
sunlight_propagates = true,
drawtype="mesh",
mesh="gravitygun_gun.obj",
on_use = function(itemstack, user, pointed_thing)
return itemstack
end,
on_place = function(itemstack, user, pointed_thing)
return itemstack
end,
})
UjEdwin wrote:It's possible with nodes, i made it in the gravitygun mod... nodes have the on_use and on_place functions like tools / items.
https://forum.minetest.net/viewtopic.php?f=9&t=14056Your 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_node("gravitygun:gun2", {
description = "Gravitygun",
range = 10,
stack_max = 1,
inventory_image = "gravitygun_gun2.png",
tiles = {"tiles"},
groups = {dig_immediate = 3},
paramtype = "light",
sunlight_propagates = true,
drawtype="mesh",
mesh="gravitygun_gun.obj",
on_use = function(itemstack, user, pointed_thing)
return itemstack
end,
on_place = function(itemstack, user, pointed_thing)
return itemstack
end,
})
I am modelling 3d guns for minetest. I want to know if player can actually hold it or not?
on_place=function(itemstack, user, pointed_thing)
return itemstack
end,
UjEdwin wrote:you can use nodes as tools, tools / craft items cant use models so why not use the nodes?
stu wrote:UjEdwin wrote:you can use nodes as tools, tools / craft items cant use models so why not use the nodes?
In a lot of cases this is true, however, nodes do not wear out like tool items do. It would be nice if tool and craft items could also support meshes.
Users browsing this forum: No registered users and 14 guests