Skip to content

Instantly share code, notes, and snippets.

@rubenwardy rubenwardy/sdsd.lua Secret
Last active Feb 14, 2017

Embed
What would you like to do?
-- in definition of node A
on_punch = function(pos, node, puncher, pointed_thing)
minetest.set_node(pos, { name = "nodeBName", param2 = node.param2 })
minetest.after(2, minetest.set_node, pos, { name = "nodeCName", param2 = node.param2 })
end,
@GreenXenith

This comment has been minimized.

Copy link

commented Feb 14, 2017

This is the code I have on nodeA, turning it into nodeB

on_punch = function(pos, node, puncher, pointed_thing)
	minetest.set_node(pos, {name = "waffles:wafflemaker_closed_full", param2 = node.param2})
end

This is for nodeB, which only works after player places, and not when the above code is called.

after_place_node = function(pos, placer, itemstack, pointed_thing)
	local node = minetest.get_node(pos) 
	minetest.after(2.0, replace_donemodel, pos, node)
end`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.