Page 1 of 1

How make entity placeable only near rails?

Posted: Wed Oct 18, 2017 4:13 pm
by tvardero
Hi all,

I'm looking for any idea how make entity placeable only near rails and how show rail-signal spots overlay when holding entity in hand.
It's not rail-signal type, it's electric-pole type. (I'm just trying to make railroad overhead line).
Should I use "filter-directions" flag? How work with it?

Thanks in advance.

Re: How make entity placeable only near rails?

Posted: Wed Oct 18, 2017 7:09 pm
by darkfrei
On place holder_entity replace it with pole_entity.

Re: How make entity placeable only near rails?

Posted: Wed Oct 18, 2017 7:33 pm
by tvardero
darkfrei wrote:On place holder_entity replace it with pole_entity.
I'll check it soon, thank you!

Re: How make entity placeable only near rails?

Posted: Thu Oct 19, 2017 3:22 pm
by tvardero
darkfrei wrote:On place holder_entity replace it with pole_entity.
so... what is a "holder-entity"? where is it?

Re: How make entity placeable only near rails?

Posted: Thu Oct 19, 2017 5:43 pm
by darkfrei
tvardero wrote:
darkfrei wrote:On place holder_entity replace it with pole_entity.
so... what is a "holder-entity"? where is it?

Code: Select all

It's not rail-signal type, it's electric-pole type.
So, on_place rail-signal-with-custom-name get positions, destroy this rail-signal and place your electric-pole instead.

Re: How make entity placeable only near rails?

Posted: Sun Oct 22, 2017 4:08 pm
by tvardero
darkfrei wrote:
tvardero wrote:
darkfrei wrote:On place holder_entity replace it with pole_entity.
so... what is a "holder-entity"? where is it?

Code: Select all

It's not rail-signal type, it's electric-pole type.
So, on_place rail-signal-with-custom-name get positions, destroy this rail-signal and place your electric-pole instead.
Now I understand this. Thank you!