RHR wrote:Some questions:
1) Is it possible to create colored light? (e.g. red, blue, green)
2) Is it possible to force a fencelike block to connect to other not fencelike blocks?
3) How can I find out how much performance a mod needs? f5 and f6 show lots of information. Where can I look up what it means?
RHR wrote:2) Is it possible to force a fencelike block to connect to other not fencelike blocks?
RHR wrote:2) Is it possible to force a fencelike block to connect to other not fencelike blocks?
RHR wrote:1) Is it possible to create colored light? (e.g. red, blue, green)
Alt. Tester wrote:Do anyone like make a Game mode with me?
And I have no idea where else to ask this.
09:43:49: ERROR[main]: /usr/share/minetest/builtin/game/register.lua:60: Name doors:door_secret does not follow naming conventions: "modname:" or ":" prefix required
Kilarin wrote:Lua syntax question.
I want to register a new type of door in a mod. So, I figured I'd just need to make my mod depend on doors and then call doors:register_door
But when I do I get: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
09:43:49: ERROR[main]: /usr/share/minetest/builtin/game/register.lua:60: Name doors:door_secret does not follow naming conventions: "modname:" or ":" prefix required
Which means I'm doing something STUPID. Any help here?
Krock wrote:If you want to add a node to a diffrent mod, you need to use:
minetest.register_node(":testmod:testnode",def)
for name, def in pairs(minetest.registered_nodes) do
if def.groups and ((def.groups.stone or 0) > 0) and def.tiles and def.tiles[1] then
local basename = name:match("[^:]+:(.*)") -- Base name of item without `modname:' prefix.
register_my_door(basename, def.tiles[1])
end
end
doors:register_door("secretdoor:door_secret_wood", {
description = "Secret Door Wood",
inventory_image = "door_wood.png",
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2,door=1},
tiles_bottom = {"default_wood.png", "default_wood.png"},
tiles_top = {"default_wood.png", "default_wood.png"},
})
Casimir wrote:Yes this is because of the drawtype. Smooth lighting is not working for nodeboxes.
Casimir wrote:I don't know about deleting, but there are some alternatives:
* Random respawn anywhere on the map. When you respawn 30000 nodes away from your first spawn, you probably won't find your old world again.
* ABM to replace air with some other node, containing an check if the player died. That way the player would be stuck where he respawns.
* Use a protector mod to protect the whole world. You can still look at what you have build and save it with worldedit, but the game is over. I like this way the best. Together with some details it would also feel very smooth. Like, respawn exactly where you died, changing the skin to ghost (like BlockMens creature mod), grant fly and fast, and so on.
ant.find_food=function(pos)
local food=minetest.find_node_near(pos, 10, "default:apple")
if food==nil then
print(tostring("no"))
else
print(tostring("yes"))
if dist>1 then
local path=minetest.find_path(pos,food,2,1,1,"A*_noprefetch")
print(tostring("path ")..dump(path))
else
minetest.remove_node(food)
end
end
return food
end
Daven wrote:Can someone post a link to the inventory_plus mod?
RHR wrote:You do not need an own group for that:
1. is diggable by bare hands
oddly_breakable_by_hand = 3
2. but sounds like a stone upon digging (like a stone that is being digged by axe)
has nothing to do with tool, just use the stone sound:
sounds = default.node_sound_stone_defaults()
3. and has some custom crack pattern (if that possible)
change the crack_anylength.png texture to your custom crack pattern.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_node("YourModName:YourBlockName", {
tiles = {"YourTexture.png"},
groups = {oddly_breakable_by_hand = 3}, -- or: groups = {oddly_breakable_by_hand = 3, choppy = 3},
sounds = default.node_sound_stone_defaults(),
})
Please post your future modding questions here:
viewtopic.php?f=9&t=4668&p=146064#p146064
Users browsing this forum: No registered users and 8 guests