2020-05-11 18:18:04 +03:00
Walkover
2017-01-13 00:58:42 +02:00
--------
2020-05-11 18:18:04 +03:00
Some mode developers have shown an interest in having an `on_walk_over` event. This is useful for pressure-plates and the like.
2017-01-13 00:58:42 +02:00
See this issue - https://github.com/minetest/minetest/issues/247
2020-05-11 18:18:04 +03:00
I have implemented a server-side version in Lua using globalstep which people might find useful. Of course this would better implemented via a client-based "on walk over", but it is sufficient for my needs now.
2017-01-13 00:58:42 +02:00
Example Usage
-------------
minetest.register_node("somemod:someblock", {
2017-02-27 19:53:17 +02:00
description = "Talking Block",
2017-01-13 00:58:42 +02:00
tiles = {"somemod_someblock.png"},
2017-02-27 19:53:17 +02:00
on_walk_over = function(pos, node, player)
minetest.chat_send_player(player, "Hey! Watch it!")
end
2017-01-13 00:58:42 +02:00
})
2017-02-27 19:53:17 +02:00
2020-05-11 18:18:04 +03:00
Credits
-------
Mod created by lordfingle, licensed under Apache License 2.0.