Add a few things in the LUA API

Keriz
Member
 
Posts: 20
Joined: Mon Jul 02, 2012 16:04

Add a few things in the LUA API

by Keriz » Fri Jul 06, 2012 08:37

Hello everybody, I was thinking about a small thing to integrate in the LUA API.

What do you think of: (example)

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_collisionode(on_collision_fridge) --like register_on_punchnode


And the function will be:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local register_on_collisionode = function(pos, node, collider) --position of node, node and the collider
--collision to a specific bloc
if node.name ~= "default:tree" then return end
--And here we could get "how" the collider collide the node. exemple:
howCollide = collider:getCollision() --0 = enter on the block 1 = jumping

--And we could also get the collidername
isPlayer = collider.name

end


I don't know if my code is good, but I think that you see what I want to explain.

Sorry for my bad english and I hope that I posted in the good section.
Last edited by Keriz on Fri Jul 06, 2012 08:39, edited 1 time in total.
 

Keriz
Member
 
Posts: 20
Joined: Mon Jul 02, 2012 16:04

by Keriz » Fri Jul 06, 2012 17:08

What do you think ? It will be very useful !
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Fri Jul 06, 2012 17:09

It would be useful
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Keriz
Member
 
Posts: 20
Joined: Mon Jul 02, 2012 16:04

by Keriz » Fri Jul 06, 2012 21:25

How to tell celeron about that ?
 

User avatar
Melkor
Member
 
Posts: 285
Joined: Sat Sep 24, 2011 01:03

by Melkor » Sat Jul 07, 2012 02:35

 

Keriz
Member
 
Posts: 20
Joined: Mon Jul 02, 2012 16:04

by Keriz » Sat Jul 07, 2012 11:30

Wo, i'll have a look, but it is more convenient.
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 12 guests

cron