News:

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

[command_x] Building slopes does not work

Started by Yona-TYT, June 25, 2017, 04:54:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT


I'm stuck in underground constructions, I need to build slopes to join both sides of the tunnel.


Yona-TYT

This works for me.  :P

                    local tun1 = coord3d(92,17,-1)
                    local tun2 = coord3d(92,16,-1)
                    local tun3 = coord3d(92,16,-2)
                    local tun4 = coord3d(92,15,-2)
                    local tun5 = coord3d(92,15,-3)   
                    local tun6 = coord3d(92,3,-3)     
                    local slope1 = coord3d(92,17,0)
                    local slope2 = coord3d(92,16,-1)
                    local slope3 = coord3d(92,15,-2)

                    local t_slope = command_x(tool_setslope)
                    local er_slpe = t_slope.set_slope(player_x(1), slope1, slope.all_down_slope)

                    local t_tun = command_x(tool_build_tunnel)
                    local er_tun = t_tun.work(player_x(1), tun1, tun2, "Rail_120_Tunnel")

                   
                    er_slpe = t_slope.set_slope(player_x(1), slope2, slope.all_down_slope)

                    er_tun = t_tun.work(player_x(1), tun3, tun4, "Rail_120_Tunnel")

                    er_slpe = t_slope.set_slope(player_x(1), slope3, slope.all_down_slope)

                    er_tun = t_tun.work(player_x(1), tun5, tun6, "Rail_120_Tunnel")


Dwachs

you do not need the call 'command_x(tool_setslope)'. It is enough to call

                    local er_slpe = command_x.set_slope(player_x(1), slope1, slope.all_down_slope)
Parsley, sage, rosemary, and maggikraut.