Enable/disable train stop with script
Posted: Thu Oct 29, 2020 9:51 am
I can toggle the state of things like assembly machines with "entity.active = false" and it will show a status of "Disabled by script".
But I notice that train stops aren't listed as active ("game.print(stop.active)" shows "false" at all times and it cannot be set to "true"). Is it possible to close a station with script?
I know I can spawn in a constant combinator (invisible if need be) and wire it to the stop but this presents several other problems like let's say I have the combinator output "red = 1" and the stop is enabled if "red = 0", the player could wire their own circuit network to basically say "red * -1, output red" to loop back and override what my script is doing. So I'd prefer to avoid this if possible.
But I notice that train stops aren't listed as active ("game.print(stop.active)" shows "false" at all times and it cannot be set to "true"). Is it possible to close a station with script?
I know I can spawn in a constant combinator (invisible if need be) and wire it to the stop but this presents several other problems like let's say I have the combinator output "red = 1" and the stop is enabled if "red = 0", the player could wire their own circuit network to basically say "red * -1, output red" to loop back and override what my script is doing. So I'd prefer to avoid this if possible.