Page 1 of 1

[0.12.22] [Hanziq] Unexpected train_changed_state event

Posted: Sat Feb 20, 2016 9:16 pm
by Choumiko
When a train is stopped at a red signal it triggers a state change every 300 ticks (repathing maybe?)

Image

Command used:

Code: Select all

/c script.on_event(defines.events.on_train_changed_state, function(event) game.players[1].print(game.tick.. " "..event.train.state) end)
Reproduce: Build the above setup, train on the right is in automode, trying to go to the station. It's state changes between "on_the_path" (0) and "wait_signal" (5)

Expected behaviour: No event triggered at all.

I used Testmode and Color coding as mods, doubt it makes any difference.

Re: [0.12.22] [Martin] Unexpected train_changed_state event

Posted: Mon Mar 14, 2016 10:28 am
by HanziQ
This is a problem with the path recalculation code, since I'm planning to do changes in that area, and the fix isn't that simple, I'm postponing this for 0.13

Re: [0.12.22] [Hanziq] Unexpected train_changed_state event

Posted: Wed Oct 26, 2016 11:48 am
by HanziQ
Seems to have been fixed with some other changes.