I am using this code:
local t = command_x(tool_build_bridge)
local err = t.work(player_x(0), square_x(brdg1.x, brdg1.y).get_ground_tile(), square_x(brdg2.x, brdg2.y).get_ground_tile(), "road_070_bridge")
???
Please have a look here:
https://github.com/aburch/simutrans/blob/master/simutrans/ai/sqai/astar.nut
(line 309). Maybe you should call 't.set_flags(2)' before calling work.
Does it work with tunnels too?
I have never tested it.
Quote from: Dwachs on July 02, 2017, 11:24:19 AM
I have never tested it.
It works fine, the problem now is that I can not lower the ground :-[ --> http://forum.simutrans.com/index.php?topic=17194.msg163811#msg163811 (http://forum.simutrans.com/index.php?topic=17194.msg163811#msg163811)