red wrote:How do you add nodes to a group if they already exist?
local data = minetest.registered_items[item]
local g = {}
if data.groups then
for k, v in pairs(data.groups) do
g[k] = v
end
end
g["group_name"] = 1
minetest.override_item(item, {groups = g})
Don wrote:Just add "static_spawnpoint = 0,0,0" to your mintest.conf
minetestcr wrote:Don wrote:Just add "static_spawnpoint = 0,0,0" to your mintest.conf
Hello Don... thanks, I tried this but it did not work. Each user spawned in a different point.
How do people that run servers to set the spawn point?
Also, why users can kill each other if I disabled Damage?
thanks again
minetestcr wrote:minetestcr wrote:Don wrote:Just add "static_spawnpoint = 0,0,0" to your mintest.conf
Hello Don... thanks, I tried this but it did not work. Each user spawned in a different point.
How do people that run servers to set the spawn point?
Also, why users can kill each other if I disabled Damage?
thanks again
the static_spawnpoint started working after a couple of reboots on the pc.
I still need to know how to disable users killing each other....
thanks
minetestcr wrote:I still need to know how to disable users killing each other....
thanks
# Whether to enable players killing each other
#enable_pvp = true# Whether to enable players killing each other
enable_pvp = falseRui wrote:If Formspec has been removed by death, what is returned?
red wrote:Is there any explanation of formspecs that doesn't leave you more confused then before?
TeTpaAka wrote:Is there a way to get the time from the last use of a tool in on_use? I want to make a tool that needs a cool down before it can be used again. I know, I could use minetest.get_us_time() and compare it with a saved value, but is there an easier way?
prestidigitator wrote:TeTpaAka wrote:Is there a way to get the time from the last use of a tool in on_use? I want to make a tool that needs a cool down before it can be used again. I know, I could use minetest.get_us_time() and compare it with a saved value, but is there an easier way?
Sure. Store it in the metadata of the tool's ItemStack (the metadata for an ItemStack is just a string, so you might need to serialize things that don't have a simple string representation).
TeTpaAka wrote:So I have to store the time of the last use and compare them with the current time.
I was thinking, there could be an easier way because the normal damage handling uses the full_punch_interval to influence the amount of damage.
prestidigitator wrote:TeTpaAka wrote:So I have to store the time of the last use and compare them with the current time.
I was thinking, there could be an easier way because the normal damage handling uses the full_punch_interval to influence the amount of damage.
Unfortunately damage is completely handled by the engine, with almost zero control or visibility from Lua. You can set damage properties when you register the tool, and that's basically it. You also can't partially override the functionality or add to it. If you do, the default damage mechanism is lost.
Dr. Console wrote:E.g. if I have a node which holds a value caled test... ?
minetest.register_node("foo:bar_node", {
<some node definitions>
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", "Hello, I'm a visible meta string!")
meta:set_string("test", "AB and C are the first letters of the alphabeth")
minetest.log("action", "I've set test to: ".. meta:get_string("test"))
end
}rubenwardy wrote:red wrote:Is there any explanation of formspecs that doesn't leave you more confused then before?
Have you read this? http://rubenwardy.com/minetest_modding_ ... specs.html
Hybrid Dog wrote:there's another bridges mod viewtopic.php?id=3488
Don wrote:I am working on updating mydeck. I want to make the stain brush wear out but I have not done much with tools. I am not sure how to do this.
What would be the best way to make it wear out?
Users browsing this forum: No registered users and 4 guests