ID = 0 globe_pos = {} anchor={ physical = false, timer=0, visual_size = {x=0.5, y=0.5}, textures = {"bullet.png"}, lastpos={}, collisionbox = {-0.17,-0.17,-0.17,0.17,0.17,0.17}, set_id = true } anchor.on_step = function(self, dtime) self.timer=self.timer+dtime --print(dump(self.set_id)) if self.set_id == true then self.ID = ID self.set_id = false print(dump(self.ID)) end globe_pos[self.ID] = self.object:getpos() end minetest.register_entity("anchor:anchor", anchor) ballast={ physical = false, timer=0, visual_size = {x=0.5, y=0.5}, textures = {"bullet.png"}, lastpos={}, collisionbox = {-0.17,-0.17,-0.17,0.17,0.17,0.17}, set_id = true } ballast.on_step = function(self, dtime) if self.set_id == true then self.ID = ID self.set_id = false print(dump(self.ID)) end print(dump(globe_pos[self.ID])) end minetest.register_entity("anchor:ballast", ballast)