News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

command_x does not work with bridges.

Started by Yona-TYT, May 31, 2017, 04:10:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT

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")



Dwachs

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.
Parsley, sage, rosemary, and maggikraut.

Yona-TYT


Dwachs

Parsley, sage, rosemary, and maggikraut.