Advertisement
Guest User

Untitled

a guest
Jun 20th, 2013
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. -- get node
  2. local pos = self.object:getpos()
  3. local node = minetest.env:get_node(pos)
  4.  
  5. -------SNIP!-------
  6.  
  7. -- Become item when hitting a node
  8. if self.lastpos.x~=nil then --If there is no lastpos for some reason
  9. if node.name ~= "air" and node.name ~= "turret:turret" then
  10. minetest.env:add_item(self.lastpos, 'throwing:arrow')
  11. self.object:remove()
  12. end
  13. end
  14. self.lastpos={x=pos.x, y=pos.y, z=pos.z}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement