1
2
3
4
2
3
4
if tile(self.x,self.y,"wall") == true then 		--Wall collision 		self:destroy(id) 	end
This works for player:
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
for i,v in ipairs(player(0,"table")) do 		--Player collision 		if(i ~= self.pid) then 			if(self:collision(i)) then 				EXPhit(i,id,256,self.dmg) 				self:destroy(id) 			end 		end 	end