Page 1 of 1

Console page, set destructible = false

Posted: Thu Dec 15, 2022 11:33 pm
by -DeadlyKitten
I was looking around for info and found
viewtopic.php?f=25&p=573021

In particular there is the useful line of code

Code: Select all

/c game.player.selected.destructible = false
I suggest adding this to the list of console commands (https://wiki.factorio.com/Console)
I think this is helpful as both an example of using selected to target a particular entity (this is not easy otherwise),
and as an easy way to make something indestructible (there is currently no easy way to do this with out mods).

I suggest including it in the 'Basic example scripts' section (section 5)

Re: Console page, set destructible = false

Posted: Fri Sep 15, 2023 3:16 pm
by Bilka
The easy way to make something indestructible is the map editor, it's an option when you open an entity's gui while in the map editor.

But I added the command anyway, plenty of commands can be done using the map editor, so it's not a strong argument against adding it to the page.

I find the "selected" mechanic not very basic, so I did not add it to the basic commands.