Check for falling node

Post Reply
User avatar
Extex
Member
Posts: 244
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

Check for falling node

by Extex » Post

Is there a way to check if a space is occupied by a falling node?
Creator of jelys_pizzaria and motorbike, and player of persistent kingdoms. RIP

User avatar
Yvanhoe
Member
Posts: 140
Joined: Fri Jul 05, 2019 03:18
Location: Japan

Re: Check for falling node

by Yvanhoe » Post

Check if a node belongs to the 'falling_node' group.

The API reference document (https://github.com/minetest/minetest/bl ... ua_api.txt) is a really useful resource to answer these questions.

User avatar
Extex
Member
Posts: 244
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

Re: Check for falling node

by Extex » Post

No how to check if an empty space contains a falling block entity
Creator of jelys_pizzaria and motorbike, and player of persistent kingdoms. RIP

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: Check for falling node

by AiTechEye » Post

"__builtin:falling_node"

for i, ob in pairs(minetest.get_objects_inside_radius(pos, 1)) do
local en = ob:get_luaentity()
if en and en.name == "__builtin:falling_node" then
...
end
end

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests