Needs help with minetest.item_place_node

Nore
Member
 
Posts: 468
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

Needs help with minetest.item_place_node

by Nore » Tue Jan 08, 2013 19:09

Do you know if I can use a node as placer for minetest.item_place_node ?
If not, is there a workaround ?

Thanks in advance !
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Tue Jan 08, 2013 19:43

I dont understand the question.
 

Nore
Member
 
Posts: 468
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

by Nore » Tue Jan 08, 2013 19:53

Well, the documentations says that:

minetest.item_place_node(itemstack, placer, pointed_thing)

Place item as a node

itemstack — ItemStack
placer — ObjectRef
pointed_thing — pointed_thing

However, I want a node to execute that command without a player (placer).
Is there a way to do it?
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Tue Jan 08, 2013 20:06

Oh, the reason I didnt understand you was that you wanted a node to call this. Nodes cant call functions.
So you want to call this function in your mod without having a player reference?
If so just use nil instead of a player reference.
 

Nore
Member
 
Posts: 468
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

by Nore » Wed Jan 09, 2013 05:26

Thank you!


About node calling functions, it is with mesecons...
Last edited by Nore on Wed Jan 09, 2013 05:27, edited 1 time in total.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 17 guests

cron