How to make an entity collide with ONLY water?

Place to get help with not working mods / modding interface.
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 583
Joined: Tue May 19, 2015 1:56 am
Contact:

How to make an entity collide with ONLY water?

Post by Reika »

I have an entity that I want to be completely intangible and able to be built on, but still removed if water is placed over/under it. This appears to require being given the water-tile collision mask, but doing that also makes it collide with everything that collides with water, which is almost everything. Is there a way to make the entity only collide with water?
Image

posila
Factorio Staff
Factorio Staff
Posts: 5273
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: How to make an entity collide with ONLY water?

Post by posila »

Try collision_mask = { "colliding-with-tiles-only", "water-tile" }, but I am not sure if it'll work exactly the way you want.

User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 583
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: How to make an entity collide with ONLY water?

Post by Reika »

posila wrote:
Thu Jun 27, 2019 3:07 pm
Try collision_mask = { "colliding-with-tiles-only", "water-tile" }, but I am not sure if it'll work exactly the way you want.
I will try it.
Image

User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 583
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: How to make an entity collide with ONLY water?

Post by Reika »

It works! Thank you!
Image

Post Reply

Return to “Modding help”