Page 1 of 1

[.15.10] on_train_changed_state not fire when train changes

Posted: Sat May 13, 2017 8:33 pm
by Nexela
/c script.on_event(defines.events.on_train_changed_state, function (event) game.print("changed") end)

Find a train in automatic mode. add a wagon to it. train switches to manual mod but event isn't triggered

Re: [.15.10] on_train_changed_state not fire when train changes

Posted: Sat May 13, 2017 8:34 pm
by Rseding91
That's not the train changing state. That's the train being destroyed and a new one created.

You want to also listen to the train created event.