Not currently, other than defining a bunch of nodes with different alpha values, and switch them on the fly.bdjnk wrote:Is there any way to alter the node definition values on the fly? For example, if I wanted to smoothly transition a node's alpha using a node timer. Is such a thing possible?
Post your modding questions here
- kaeza
- Moderator
- Posts: 2162
- Joined: Thu Oct 18, 2012 05:00
- GitHub: kaeza
- IRC: kaeza diemartin blaaaaargh
- In-game: kaeza
- Location: Montevideo, Uruguay
- Contact:
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!
Check out my stuff! | Donations greatly appreciated! PayPal
Check out my stuff! | Donations greatly appreciated! PayPal
-
- Member
- Posts: 40
- Joined: Mon May 06, 2013 23:55
- Evergreen
- Member
- Posts: 2135
- Joined: Sun Jan 06, 2013 01:22
- GitHub: 4Evergreen4
- IRC: EvergreenTree
- In-game: Evergreen
- Location: A forest in the midwest
- Contact:
- Evergreen
- Member
- Posts: 2135
- Joined: Sun Jan 06, 2013 01:22
- GitHub: 4Evergreen4
- IRC: EvergreenTree
- In-game: Evergreen
- Location: A forest in the midwest
- Contact:
- Dan Duncombe
- Member
- Posts: 904
- Joined: Thu May 09, 2013 21:11
- Location: In the unknown depths of Earth
Are dropped items counted as entities? If they are, might that help?
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
My Games: Nostalgia Realtest Revamped
Servers: See above games.
- Evergreen
- Member
- Posts: 2135
- Joined: Sun Jan 06, 2013 01:22
- GitHub: 4Evergreen4
- IRC: EvergreenTree
- In-game: Evergreen
- Location: A forest in the midwest
- Contact:
I've got some code I'd like to execute whenever a certain type of node is added to the world, including when starting / playing / connecting to the game. Node definitions have lua functions for when hooking to events, for instance on_construct which seemed to most likely candidate, but that doesn't work. Is there some way to do this?
- kaeza
- Moderator
- Posts: 2162
- Joined: Thu Oct 18, 2012 05:00
- GitHub: kaeza
- IRC: kaeza diemartin blaaaaargh
- In-game: kaeza
- Location: Montevideo, Uruguay
- Contact:
on_construct is only called when the node is placed. Unfortunately, what you require is not so easy (if even practical) to implement.bdjnk wrote:I've got some code I'd like to execute whenever a certain type of node is added to the world, including when starting / playing / connecting to the game. Node definitions have lua functions for when hooking to events, for instance on_construct which seemed to most likely candidate, but that doesn't work. Is there some way to do this?
Edit: I assume you mean the code is run *only* once after connecting. Am I mistaken?
Last edited by kaeza on Thu Jun 20, 2013 04:48, edited 1 time in total.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!
Check out my stuff! | Donations greatly appreciated! PayPal
Check out my stuff! | Donations greatly appreciated! PayPal
I wasn't very clear, sorry. Yeah, I want it to run once, but probably just when the game / server starts. I don't think I need it for all connecting / joining. I would've thought there'd be some kind of mapping / node creation process that occurred which I'd be able to link into...kaeza wrote:on_construct is only called when the node is placed. Unfortunately, what you require is not so easy (if even practical) to implement.bdjnk wrote:
I've got some code I'd like to execute whenever a certain type of node is added to the world, including when starting / playing / connecting to the game. Node definitions have lua functions for when hooking to events, for instance on_construct which seemed to most likely candidate, but that doesn't work. Is there some way to do this?
Edit: I assume you mean the code is run *only* once after connecting. Am I mistaken?
Still, I gonna try and use register_on_joinplayer or register_on_newplayer and a find_nodes_in_area. I don't think it's the "right" answer, but it might work.
Oh, on that note, what is the difference between register_on_joinplayer and register_on_newplayer? The wiki isn't very clear about it.
- kaeza
- Moderator
- Posts: 2162
- Joined: Thu Oct 18, 2012 05:00
- GitHub: kaeza
- IRC: kaeza diemartin blaaaaargh
- In-game: kaeza
- Location: Montevideo, Uruguay
- Contact:
on_join gets called every time a player joins. on_new is only called every time a *new* player joins your server (i.e. a player that never joined your server before).bdjnk wrote:I wasn't very clear, sorry. Yeah, I want it to run once, but probably just when the game / server starts. I don't think I need it for all connecting / joining. I would've thought there'd be some kind of mapping / node creation process that occurred which I'd be able to link into...kaeza wrote:on_construct is only called when the node is placed. Unfortunately, what you require is not so easy (if even practical) to implement.bdjnk wrote:
I've got some code I'd like to execute whenever a certain type of node is added to the world, including when starting / playing / connecting to the game. Node definitions have lua functions for when hooking to events, for instance on_construct which seemed to most likely candidate, but that doesn't work. Is there some way to do this?
Edit: I assume you mean the code is run *only* once after connecting. Am I mistaken?
Still, I gonna try and use register_on_joinplayer or register_on_newplayer and a find_nodes_in_area. I don't think it's the "right" answer, but it might work.
Oh, on that note, what is the difference between register_on_joinplayer and register_on_newplayer? The wiki isn't very clear about it.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!
Check out my stuff! | Donations greatly appreciated! PayPal
Check out my stuff! | Donations greatly appreciated! PayPal
- Dan Duncombe
- Member
- Posts: 904
- Joined: Thu May 09, 2013 21:11
- Location: In the unknown depths of Earth
How do I make a node that plays a certain sound for a certain range upon receiving mesecon signal? Also, how do I change the range? The sound needs to loop as long as a current is being received.
EDIT: Also, with custom nodebox shapes, are the first 3 numbers the box shape, the second 3 the location of the box relative to the node centre?
EDIT: Also, with custom nodebox shapes, are the first 3 numbers the box shape, the second 3 the location of the box relative to the node centre?
Last edited by Dan Duncombe on Sun Jun 23, 2013 22:42, edited 1 time in total.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
My Games: Nostalgia Realtest Revamped
Servers: See above games.
- kaeza
- Moderator
- Posts: 2162
- Joined: Thu Oct 18, 2012 05:00
- GitHub: kaeza
- IRC: kaeza diemartin blaaaaargh
- In-game: kaeza
- Location: Montevideo, Uruguay
- Contact:
A .dll or .so that can directly interface with the engine, nope.1244 wrote:It is possible to write mod in c++?
Only way to "mod" in C/C++ is by writing patches for the engine.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!
Check out my stuff! | Donations greatly appreciated! PayPal
Check out my stuff! | Donations greatly appreciated! PayPal
- kaeza
- Moderator
- Posts: 2162
- Joined: Thu Oct 18, 2012 05:00
- GitHub: kaeza
- IRC: kaeza diemartin blaaaaargh
- In-game: kaeza
- Location: Montevideo, Uruguay
- Contact:
the first three ones are one corner of the box, and the other three are the other corner.Dan Duncombe wrote:How do I make a node that plays a certain sound for a certain range upon receiving mesecon signal? Also, how do I change the range? The sound needs to loop as long as a current is being received.
EDIT: Also, with custom nodebox shapes, are the first 3 numbers the box shape, the second 3 the location of the box relative to the node centre?
All positions are relative to the *center* of the node, so -0.5 and 0.5 means the edge. Of course, you can use boxes bigger than a node, but the collision is buggy.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!
Check out my stuff! | Donations greatly appreciated! PayPal
Check out my stuff! | Donations greatly appreciated! PayPal
- Mossmanikin
- Member
- Posts: 599
- Joined: Sun May 19, 2013 16:26
- Location: where we don't speak english.
The dimensions of a standard node:Dan Duncombe wrote:EDIT: Also, with custom nodebox shapes, are the first 3 numbers the box shape, the second 3 the location of the box relative to the node centre?
Code: Select all
-- { left , bottom , front , right , top , back }
local cube = {-0.5 , -0.5 , -0.5 , 0.5 , 0.5 , 0.5 }
- Dan Duncombe
- Member
- Posts: 904
- Joined: Thu May 09, 2013 21:11
- Location: In the unknown depths of Earth
So...The first 3 are one half of the block, the other three are the other half of the block?
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
My Games: Nostalgia Realtest Revamped
Servers: See above games.
- Mossmanikin
- Member
- Posts: 599
- Joined: Sun May 19, 2013 16:26
- Location: where we don't speak english.
Sort of, yes. But you still need 6 coordinates to draw a "half block".Dan Duncombe wrote:So...The first 3 are one half of the block, the other three are the other half of the block?
EDIT: Have you seen this post? VanessaE explains quite well how a nodebox works there.
Last edited by Mossmanikin on Mon Jun 24, 2013 07:41, edited 1 time in total.
-
- Member
- Posts: 67
- Joined: Sat Jun 01, 2013 01:05
-
- Member
- Posts: 85
- Joined: Mon Jun 24, 2013 09:10
I have a couple of issues at the moment that are hampering me. Most likely entirely because of my limited experience with coding.
The first is that my modded blocks don't seem to work properly when adding them to the stairs mod from the Minetest game. The new node blocks were defined within the default folder in the nodes.lua file just like the Minetest game. These are my block definitions in the stairs mod.
My second question is, how do I go about adding a new furnace block that only accepts certain blocks for fuel?
The first is that my modded blocks don't seem to work properly when adding them to the stairs mod from the Minetest game. The new node blocks were defined within the default folder in the nodes.lua file just like the Minetest game. These are my block definitions in the stairs mod.
Code: Select all
--
--This one works fine. The Limestone block uses the default stone ID.
--
stairs.register_stair_and_slab("Limestone", "default:stone",
{cracky=3},
{"hg_gls.png"},
"Limestone Stair",
"Limestone Slab",
default.node_sound_stone_defaults())
--
--This one and any other new blocks won't work.
--
stairs.register_stair_and_slab("Red Sandstone", "default:red_sandstone",
{cracky=3},
{"hg_rss.png"},
"Red Sandstone Stair",
"Red Sandstone Slab",
default.node_sound_stone_defaults())
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
There is no node called "default:red_sandstoe" in the default mod, so the recipes wont work.Thermal_Shock wrote:I have a couple of issues at the moment that are hampering me. Most likely entirely because of my limited experience with coding.
The first is that my modded blocks don't seem to work properly when adding them to the stairs mod from the Minetest game. The new node blocks were defined within the default folder in the nodes.lua file just like the Minetest game. These are my block definitions in the stairs mod.
Code: Select all
-- --This one works fine. The Limestone block uses the default stone ID. -- stairs.register_stair_and_slab("Limestone", "default:stone", {cracky=3}, {"hg_gls.png"}, "Limestone Stair", "Limestone Slab", default.node_sound_stone_defaults()) -- --This one and any other new blocks won't work. -- stairs.register_stair_and_slab("Red Sandstone", "default:red_sandstone", {cracky=3}, {"hg_rss.png"}, "Red Sandstone Stair", "Red Sandstone Slab", default.node_sound_stone_defaults())
-
- Member
- Posts: 85
- Joined: Mon Jun 24, 2013 09:10
Oh. You misunderstand. My new node's are added to the node.lua file.PilzAdam wrote:There is no node called "default:red_sandstoe" in the default mod, so the recipes wont work.
Edit:
Well this is interesting. It seems removing the space in "Red Sandstone" to "RedSandstone" fixed the issue and now it works as intended.
Code: Select all
stairs.register_stair_and_slab("RedSandstone", "default:red_sandstone",
{cracky=3},
{"hg_rss.png"},
"Red Sandstone Stair",
"Red Sandstone Slab",
default.node_sound_stone_defaults())
Last edited by Thermal_Shock on Wed Jun 26, 2013 21:18, edited 1 time in total.
My concrete 2.2 mod seems to shut server down when you dig the concrete.
Code causing the problem most likely is...
can you find the problem?
Code causing the problem most likely is...
Code: Select all
minetest.register_node("concrete:concrete", {
description = "Concrete",
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
after_destruct = function(pos)
minetest.env:set_node(pos, "concrete:concrete4")
end,
})
minetest.register_node("concrete:concrete1", {
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
after_destruct = function(pos)
minetest.env:set_node(pos, "concrete:concrete2")
end,
})
minetest.register_node("concrete:concrete2", {
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
after_destruct = function(pos)
minetest.env:set_node(pos, "concrete:concrete3")
end,
})
minetest.register_node("concrete:concrete3", {
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
after_destruct = function(pos)
minetest.env:set_node(pos, "concrete:concrete")
end,
})
minetest.register_node("concrete:concrete4", {
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
after_destruct = function(pos)
minetest.env:set_node(pos, "concrete:concrete5")
end,
})
minetest.register_node("concrete:concrete5", {
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
after_destruct = function(pos)
minetest.env:set_node(pos, "concrete:concrete6")
end,
})
minetest.register_node("concrete:concrete6", {
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
})
minetest.register_node("concrete:reinforced_concrete", {
description = "Reinforced Concerte",
tiles = {"concrete_concrete.png"},
is_ground_content = true,
groups = {cracky=1},
drop = "concrete:gravel_mound",
after_destruct = function(pos)
minetest.env:set_node(pos, "concrete:concrete1")
end,
})
I have stopped playing minetest, and may not come back to it again. I would like to thank everyone that made the amazing time I had playing it. This account is not in use anymore, and the email has been linked to a unused account. If any administrator reading this has time, feel free to delete my account. Thank you very much for the great experience.
Who is online
Users browsing this forum: No registered users and 8 guests