Code: Select all
minetest.register_node("parcour:endpoint", {
description = "Zielpont",
drawtype = "plantlike",
waving = 0,
tiles = {"checkpoint.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
groups = {snappy = 5,},
on_punch = function(pos, node, player, pointed_thing)
-- place a random dry grass node
minetest.chat_send_all(player:get_player_name().." Hat den parcour geschafft!")
local idx = player:hud_add({
hud_elem_type = "text",
position = {x = 1, y = 0.5},
offset = {x = -120, y = -25},
text = "Du hast den Parcour geschafft!",
alignment = 0,
scale = { x = 100, y = 30},
number = 0xFF0000,
minetest.after(5, func, player:remove_hud(idx)())
})
end,
})