Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- get node
- local pos = self.object:getpos()
- local node = minetest.env:get_node(pos)
- -------SNIP!-------
- -- Become item when hitting a node
- if self.lastpos.x~=nil then --If there is no lastpos for some reason
- if node.name ~= "air" and node.name ~= "turret:turret" then
- minetest.env:add_item(self.lastpos, 'throwing:arrow')
- self.object:remove()
- end
- end
- self.lastpos={x=pos.x, y=pos.y, z=pos.z}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement