Collision Masks

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
Xavier630
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Oct 15, 2016 12:15 am
Contact:

Collision Masks

Post by Xavier630 »

Hi guys

I was wondering if anyone knows what the collision mask of gates is? Specifically how it allows players through but not biters?
Unless there is a hard-coded check for players nearby, the only way I can see it working is if players have a different collision mask to biters. There is no "enemy-layer" so it doesn't seem likely to me.

I'm asking because gates collide with water_tiles, which is really inconvenient for me, so I've tried changing their collision mask, but the settings I choose seem to allow both players and biters through or neither. Either I've messed up the gate collision mask, or perhaps the biter mask.

Thanks

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Collision Masks

Post by aubergine18 »

Some infos here from Rseding91: viewtopic.php?p=216793#p216793
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

Xavier630
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Oct 15, 2016 12:15 am
Contact:

Re: Collision Masks

Post by Xavier630 »

Nothing on collision masks there, but nevertheless, good info on gates.

Thanks for the reply!

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Collision Masks

Post by aubergine18 »

If you'd read the post, you'd see that gates aren't really based on collision masks. The trajectory of a player or train is what opens the gate. They don't work the same way as most other things.

Also, players are in the "player" force, biters are in the "enemy" force. So the game knows difference between friend and foe. I'm not sure what would happen if you built a gate with it's force set to "enemy" - maybe it would open for biters and close for players?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

Post Reply

Return to “Technical Help”