Page 1 of 1

ability to clone cliffs

Posted: Sun Mar 25, 2018 6:41 pm
by sparr
I am cloning entities using surface.create_entity() with parameters taken from existing entities. I can read cliff_orientation from an entity, but I can't pass it to create_entity or write it to the new entity, so I get something like this:

https://i.imgur.com/fBPZLvq.png

I need access to set cliff_orientation for new cliffs, and I might need access to some other info to read from existing cliffs and set on new cliffs.

Re: ability to clone cliffs

Posted: Sun Mar 25, 2018 6:50 pm
by blueblue
You can pass the cliff orientation to create_entity, though I agree this should be documented in the api. Example:

Code: Select all

/c game.player.surface.create_entity{name="cliff", position=game.player.position, cliff_orientation = "north-to-south"}