Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- minetest.register_on_punchnode(function (pos, node, puncher)
- if string.find(node.name, "jumping:trampoline") then
- local id = string.sub(node.name, #node.name) --get number
- local name = puncher:get_player_name() --get puncher's name
- id = id + 1
- if id == 7 then id = 1 end
- minetest.env:add_node(pos, {name = string.sub(node.name, 1, #node.name - 1)..id})
- minetest.chat_send_player(name, "Setting: "..id) --tell the puncher what setting the trampoline is
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment