Code: Select all
script.on_event(defines.events.on_space_platform_changed_state, function(event)
local plat = event.platform
game.print(plat.name.." has been changed state from:"..event.old_state.. ",to:" .. plat.state)
end)
-It will catch when a platforms takes off (from state 2 to 6), but it will not catch the change from 6 to 2 when the platform reaches the destination.
-Attached is picture of platform and game.print infos using above script.
-It does not appear to matter if there is a condition that need filled or not.
How to replicate:
-Send platform to any planet starting from an idle state (waiting on conditions or just paused)
What I expected to happen:
-Change of state from 6 to 2 when leaving
-Change from state 2 to 6 when reaching destination
It happens every time.
I have debugger mods and the mod I am currently making enabled, can attach them as well if needed.