The command only works using the "utility" player, but trying to use the "human" player then fails.
Script Test: script_test.zip
Savegame: test-comm-tunn.sve
local sc_tunn_name = "Rail_120_Tunnel"
local t_tunn = tile_x(92,18,0)
t_tunn.remove_object(player_x(1), mo_label)
local t = command_x(tool_build_tunnel)
t.set_flags(2)
t.work(player_x(0), t_tunn, sc_tunn_name)
Captura desde 2022-12-19 21-53-05.png
Could it be that the tunnel object is not available for building due to timeline constraints?
Quote from: Dwachs on December 20, 2022, 07:32:34 AMCould it be that the tunnel object is not available for building due to timeline constraints?
Time constraints don't affect commands (I bought it by building stations).I've changed the names (tunnels, bridges and ways), and now everything works fine, thanks!