Code: Select all
	elseif event.createdentity.name == "flooring" then
		
		if game.gettile(event.createdentity.position.x,event.createdentity.position.y).name=="floor" then
			game.player.character.insert{name="flooring",count=1}
		else
			game.settiles{{position=event.createdentity.position,name="floor"}}
		end
		event.createdentity.destroy()
	--elseif event.createdentity.name == "bridge" then
	--	game.settiles{{position=event.createdentity.position,name="bridge"}}
	--	event.createdentity.destroy()
	endMore extended code
I added game.getplayer().print(game.gettile(event.createdentity.position.x, event.createdentity.position.y).name), and it seems to return grass even when it is not grass.It does really weird things
Edit:The problem is something with the transitions of tiles, because If I edit a 3x3 instead of a 1x1, it only works weird when used between two diferent tiles (like grass and sand, or dark sand and sand.




