Help with proper way of making collisions

Place to get help with not working mods / modding interface.
MsBinaryLily
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Jan 24, 2025 12:46 pm
Contact:

Help with proper way of making collisions

Post by MsBinaryLily »

Hi, so, I'm making a mod that includes a grenades that explodes in a cluster of tree seeds that plant trees wherever they land.

So far, I had no problem with the projectile part, however...
The scattered seeds seem to plant themselves EVERYWHERE.
That includes water, concrete, nuclear ground, inside buildings, inside ghosts (which deletes them, very annoying)

Ideally, I just want seeds to plant themselves on valid unoccupied tiles, (optionally) drop themselves as an item (marked for deconstruct) on hitting artificial tile, and just die and do nothing on all other tiles. And generally not interfere with buildings / ghosts.

I've heard about collision masks and layers, however I don't quite understand how these should be set up and I feel like I've been doing weird things.
What would be the best way to do this?
Attachments
treenade_1.3.7.zip
(260.75 KiB) Downloaded 4 times
Natha
Fast Inserter
Fast Inserter
Posts: 240
Joined: Sun Mar 15, 2015 1:48 pm
Contact:

Re: Help with proper way of making collisions

Post by Natha »

What happens if you set find_non_colliding_position to false?
Post Reply

Return to “Modding help”