Page 1 of 1

Ability to specify a collision_mask for a gate barrier

Posted: Sat Apr 20, 2019 11:11 pm
by Earendel
I have a gate that can only go on a spaceship so I set it to collide with ground-tile so it can't be placed on normal ground.

Code: Select all

{
  "ground-tile",
  "water-tile",
  "object-layer",
  "item-layer",
}
The problem is that the player can go through closed doors.

If I add "player-layer" to the list, the player can't go through open doors.

I'm thinking that the entity has two default collision masks normally, but setting the value on the prototype seems to affect both?

If there's something like a secondary collision mask it would be great to be able to set that in the prototype.

Re: Ability to specify a collision_mask for a gate barrier

Posted: Wed Apr 24, 2019 2:23 pm
by Bilka
Earendel wrote: Sat Apr 20, 2019 11:11 pm I'm thinking that the entity has two default collision masks normally, but setting the value on the prototype seems to affect both?
This is indeed the case, the second collision mask is also loaded as "collision_mask", just like the normal entity collision mask. Must have been an oversight (a 3 year old oversight). I renamed that secondary collision mask to opened_collision_mask for the next version.

Re: Ability to specify a collision_mask for a gate barrier

Posted: Wed Apr 24, 2019 4:58 pm
by Earendel
Great, thanks. Funny how these things can can go so long unnoticed.